Skip to content

fix: say where to sign in on a refused kiro credential - #36888

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/auth-denied-sign-in-pointer
Nov 18, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/auth-denied-sign-in-pointer

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When a chat cannot run because the user is not signed in to Kiro, or their sign-in was refused, Kiro Crew tells them where and how to sign in, and on Kiro Crew's own engine it offers the sign-in before the first message fails. Every signed-out spot (the chat before the first message, the failed chat row, Settings and the app-level notice) shows one line and a Sign in button that opens one shared sign-in dialog (Layout 1). A signed-out chat on kiro-cli's relay shows the welcome screen's two kiro-cli commands, Check sign-in again and Sign in; on the Kiro CLI harness without the relay it shows the two commands and Check sign-in again.

A user's chat turn failed with only this, and they had no way to find the sign-in:

❌ Access denied. Please check your authentication. (Request ID: 69c7…) (request_id: 69c7…)

The sentence is KAS's fixed text for a credential the Kiro service refused (AccessDeniedError). It names no place to sign in, the error row offers no Sign in to Kiro button, and the request id is printed twice. On a fresh install on Kiro Crew's own engine nothing says a sign-in is needed until a message fails (#32058, #36381).

Why it matters

Nothing works until the user signs in, and today the error does not say how. The user said most people would not know where to sign in, would ask their crew, and the crew could not tell them either. The owner agreed that the error must say where to sign in.

Not a goal

What changed (motivation → approach → change)

Failed turn. Symptom: the raw access-denied sentence with no sign-in action. Cause: the sentence has no 401/403 and no expiry wording, so _RE_SESSION_EXPIRED in acp/transport_errors.py did not match and the turn took the unknown-error fallback. Change: one alternation for that exact sentence. The turn now takes the existing session-expiry arm, with its sign_in_needed / auth_required tags, and the request id is kept once, behind a copy control.

One look for every signed-out spot (Layout 1). Each spot shows one line and a Sign in button. The button opens one shared dialog, components/KiroSignInDialog.tsx, which holds the four sign-in choices, the browser wait or the device code, and cancel. It closes itself when the sign-in lands. The dialog is used by:

  • the chat before the first message on Kiro Crew's own engine (KiroSignInPrompt, "Sign in to Kiro to start chatting");
  • the chat row after a refused sign-in (ErrorCard, "Sign in to Kiro to keep chatting");
  • Settings → Agent Harness → Kiro sign-in (Sign in / Switch account / Sign in again);
  • the app-level "Kiro sign-in expired" notice.

The row follows where the turn ran. The decision is made from the route the last KAS spawn recorded (chat_turn/recovery._terminal_error_meta). That route is the process's last KAS spawn, not the failing runtime's own, so another chat's later spawn can pick the row kind; host_auth on main reads it the same way, and the per-runtime fix is tracked in #39077.

Where the chat ran What the row offers
Kiro Crew's own engine (bundle) Sign in button
kiro-cli's relay, from a KAS pick or a saved Kiro CLI pick kiro-cli's two commands with copy, Check sign-in again, and Sign in
Kiro CLI with no relay kiro-cli's two commands with copy, and Check sign-in again

On kiro-cli 3.x the relay runs on Kiro Crew's sign-in when the vault holds one, and on kiro-cli's own otherwise. On older kiro-cli it uses kiro-cli's own sign-in only. So the relay row offers both ways in. A relay row is kind: kiro_cli_sign_in with crew_sign_in: true. Which sign-in the relay draws is unchanged.

The welcome screen's own pieces. The kiro-cli row reuses the welcome screen's status hook (hooks/useKiroPrerequisite.ts) and its command list (components/KiroCliSignInCommands.tsx, shared with KiroPrerequisiteGate). The commands show only while that status says kiro-cli is installed and not signed in. When kiro-cli is already signed in, the relay row keeps only the Sign in button. The welcome screen is unchanged (#15-#18: no pixels differ in the setup card).

Ask before a message fails (bundle route only). The gateway decides, so the dashboard never guesses the route. GET /api/kas-bundle and the install reply gain chat_needs_sign_in. It is true only for the owner, with KAS as agent.acp_backend, when kas_route.bundle_route_lacks_sign_in() finds the next spawn on the bundle route with no usable Kiro Crew sign-in. Whenever any of that cannot be worked out, it is false.

One sign-in flow, logic in hooks. The flow's state machine moved from KasLoginGate.tsx into hooks/useKasLogin.ts (useKasLoginFlow, useKasLoginStatus, KAS_LOGIN_STATUS_KEY). KasLoginGate.tsx only renders it. Closing the dialog mid-sign-in cancels the pending login.

The agent can answer "how do I sign in". The shipped getting-started.md names the Settings path, the chat prompt and kirocrew kas login.

Backwards compatibility

Compatible:

  • chat_needs_sign_in is a new optional field. An older gateway sends none, and the prompt stays hidden.
  • The regex only adds one exact sentence.
  • kiro_cli_sign_in is a new row kind. An older dashboard renders it as a plain error row.
  • The flow keeps its exports (KasLoginGate, KasLoginEmbedded, KasLoginFlowSlots).

Reader: the chat error row and the Settings card no longer print the signed-out sentence and the Settings path inline. They show one line and the Sign in button that opens the same choices. The request id moved behind a copy control. The owner chose Layout 1 for every signed-out spot.

Tests

  • test/test_kas_access_denied_sign_in.py covers these cases:
    • On KAS, the measured frame is sign_in_needed + auth_required, terminal, and keeps the request id once.
    • The Kiro CLI launch with no relay is tagged kiro_cli_sign_in, never auth_required.
    • A signed-out relay offers both sign-ins. With no spawn yet, or on the bundle, the row stays auth_required.
    • Other "access denied" text is not a sign-in error.
  • test/test_transient_notice_parity.py: a relay row keeps its kas_signed_out notice and gains crew_sign_in.
  • test/test_chat_runner_turn_error_arms.py: a Kiro CLI sign-in failure gets the kiro_cli_sign_in row.
  • test/test_kas_route.py::TestBundleRouteLacksSignIn and test/test_kas_bundle_api.py: chat_needs_sign_in.
  • Website:
    • KiroSignInPrompt.test.tsx
    • KiroCliSignInRow.test.tsx (commands, Check again, the relay's added Sign in, and the button kept once kiro-cli is signed in)
    • ErrorCard.test.tsx (the request id copy kept under a translated notice)
    • transcriptRenderers.test.tsx (the composer names the sign-in first under a kiro_cli_sign_in row; a pane with no onOpenSignIn withholds that row's Continue)
    • KiroSignInCard*.test.tsx and KiroSignInNotice.test.tsx (the dialog)

Proof: not provable -- other: this host forbids local test runs, so CI runs the suite

Manual verification

The three shots under This head in Screenshots come from head 75b3edc56af153fb7cc9433a3bbc14c4171e4793 (the repo's capture harness, see there). Every other shot comes from real gateways on this branch at 1f867d73d6. Head 73cc5c2167 carries the owner-picked redesign above, and the decision entry docs/decisions/2026-11-18-signed-out-sign-in-prompts-do-not-name-the-engine-route.md (owner decision: #36888 (comment)), which replaces the 2026-10-30 prompt clause. Earlier, on top of main's changes: on the relay row, Check sign-in again is the one filled button and Sign in is an outlined button of the same size (#19-#26 retaken for this); the signed-out kiro-cli row keeps its own text when the status cannot name the commands (a viewer's redacted status); a sign-in dialog closed while its begin request is in flight cancels the login that request returns and opens no tab; and the unused intro slot is removed. None of these changes a shot. Screens are the built SPA driven by Playwright. kiro-cli 3.4.0 was really signed out on every gateway (kiro-cli whoami printed "Not logged in").

  1. Kiro Crew's own engine, signed out, fresh chat: "Sign in to Kiro to start chatting" with Sign in (test: validate CI workflows on KiroCrew #1). The dialog opens (refactor: rename project KiroClaw to KiroCrew #2). AWS Builder ID gives a real device code (refactor: remove dead legacy compatibility shims #3). Phone: fix(app-sdk): harden scoped-API guard against path traversal and 204 bodies #4-feat: webapp artifact kind + Artifact Deploy console (folded into Artifacts) #6.
  2. Settings → Agent Harness → Kiro sign-in opens the same dialog (fix(sandbox): bypass toolbox shim to fix nested sandbox failure on macOS 26 #7-fix(signing): Authenticate CDSigner requests with awscurl (SigV4) #10).
  3. A stored sign-in the Kiro service refuses, then "hello": "Sign in to Kiro to keep chatting", with the request id behind the copy button (fix(security): authenticate MCP routes in --slack-only headless gateway #11-feat(artifacts): mirror MeshClaw artifacts page (durable comments, masonry, publish seam) #14).
  4. A saved Kiro CLI pick (agent.acp_backend: kiro). It runs on the relay because kiro-cli has v3, and the vault is empty. Row: one line, both kiro-cli commands, Check sign-in again, and Sign in. Meta: kind: kiro_cli_sign_in, crew_sign_in: true (docs(skill): add pod CLI reference to kirocrew-commands #19-ci: harmonize and strengthen the AI code-review prompts and gates #22).
  5. A KAS pick (kas_bundle: false) with a refused sign-in in the vault, also on the relay. The row and meta match item 4 (ci(publish-cli): serve CLI via CloudFront over dedicated dist bucket #23-feat: colorful app icons + hero banners for App Store #26).

Static gates on this host: black, isort, flake8, mypy --platform linux, comment-history, brand, line cap, harness parity, docs-lint, tsc, eslint, i18n:check, SPA build.

Screenshots / video

This head (75b3edc56af153fb7cc9433a3bbc14c4171e4793). Taken with the repo's harness, node website/scripts/capture-kiro-sign-in-notice.mjs (updated in this PR for the new copy, the in-place dialog and the signed-out Settings frame): the built SPA in headless Chromium, every /api/** call answered by website/scripts/lib/stub-dashboard-api.mjs, KAS as the agent harness. All 15 frames asserted their state before writing the PNG; (a), (b) and (c) are its frames 15, 01 and 07.

(a) Settings → Kiro account → Kiro sign-in, signed out, before the dialog opens: one Sign in button, no dialog.

(a) Settings, Kiro sign-in card, signed out, one Sign in button

(b) The "Kiro sign-in expired" notice: its Sign in button opens the shared dialog in place.

(b) Kiro sign-in expired notice with a Sign in button

(c) The status-unavailable notice, with the new line "Sign in again if your Kiro sign-in stopped working, or ask the agent to look into it.", Sign in and Ask the agent.

(c) We could not check sign-in status notice with Sign in and Ask the agent


Older heads, not this head. Owner-picked redesign (shots below from 069af06a6e; a fresh set #1–#12 at 060c52c852, the same tree as head 73cc5c2167 for this PR's UI files, is in the worker's shot folder). Real gateways, kiro-cli 3.4.0 signed out. Before is head e152b0bbc1.

A. Signed-out relay row: Check sign-in again stays the one primary, then "or", then the outlined "Use the Kiro Crew sign-in". On a phone the row stacks.

#1 A before

#4 A after

#6 A after, phone

B. Sign-in dialog: Google, GitHub and AWS marks, centred, "or", company SSO last. The hint lines are main's (#34845).

#7 B before

#10 B after

C. Device code: one heading, Open sign-in page with a copy control, the code with its own copy control, one waiting line, and a back arrow in the dialog header.

#13 C before

#16 C after

#17 C after, dark

Failed turn with a refused sign-in. Before (main):

Before: raw access-denied sentence, request id twice, only Resume

After, Kiro Crew's own engine (#11):

#11 After: one line, copy request id, Sign in

Fresh chat while signed out on Kiro Crew's own engine. Before (main):

Before: no sign-in offered until a message fails

After (#1), the shared dialog (#2), and a device code in it (#3):

#1 Sign in to Kiro to start chatting

#2 The shared sign-in dialog

#3 Device code inside the dialog

Signed-out chat on kiro-cli's relay. A saved Kiro CLI pick (#19, phone #21) and a KAS pick (#23). Sign in opens the same dialog (#24):

#19 Kiro CLI pick on the relay: commands, Check again, Sign in

#21 Same, phone

#23 KAS pick on the relay

#24 Sign in from the relay row

Settings and phone dialog, welcome screen unchanged

#8 Settings opens the same dialog

#5 Dialog on a phone

#17 Welcome screen on this branch, identical to main

Related Issues

Fixes #36870. Related: #32058, #36381, #36443.

Sibling sweep

Swept: git grep -n "_RE_SESSION_EXPIRED|_is_session_expired|is_auth_failure_output" -- src/
Sibling: src/kiro_crew/acp/transport_errors.py -- changed here -- the one vocabulary every reader (formatter, transient classifier, sign-in tags, stderr latch) shares
Sibling: src/kiro_crew/agent_sdk/host_auth.py -- not affected -- its signed-out messages are reused unchanged; the engine's SignInRequiredError wording is tracked in #36464

Pattern harvest

Not generalizable: each engine error wording is a fixed sentence the vocabulary has to list once; the vocabulary is already the single shared place.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners November 13, 2026 22:09
@CrysisDeu
CrysisDeu requested a review from mbriones98 November 13, 2026 22:09
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 75b3edc56af153fb7cc9433a3bbc14c4171e4793 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the change fixes the regex at the cause, the rendered evidence covers the new surfaces, and the narrowed auth_required row has no reader that breaks.

Notes

  • _terminal_error_meta picks the row kind from last_spawn_route(), which is shared by the whole process ("another chat's later spawn can pick the row kind"). When two chats use different routes, one of them can show the wrong sign-in. The author has disclosed this and tracks it in Signed-out sign-in prompt reads the process-wide last spawn route, not the failing runtime's #39077. It should be fixed in that follow-up, not added to this PR.
  • The Reader: line in ## Backwards compatibility is prose and does not use the required <path>:<symbol> shape. The readers that are actually affected (taskq/adapters/acp_provider.py, llm_helpers_parts/backend_errors.py, ErrorCard.tsx) still work, because they also read sign_in_needed or the exception attribute, not the row kind.

[DESIGN-REVIEWED] 75b3edc

Description read

[DESCRIPTION-READ] 242455325555a2bb8ec1fed654a68054418b7c9d59b74ad287da03b225bec615

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 75b3edc56af153fb7cc9433a3bbc14c4171e4793 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The Google and AWS marks on the sign-in buttons are a rider the description never mentions, and they bring trademark and licence surface for buttons that already carry text labels.

Notes

  • Item 9 — undeclared, rides along: import googleMarkUrl from '../assets/google-mark.svg' and awsMarkUrl are new brand marks on buttons that already read "Continue with Google" and "AWS Builder ID". They add a THIRD-PARTY-NOTICES block and a vite.config.ts inline-limit entry, and no sentence in the description names the defect they fix. Subtraction: delete google-mark.svg, aws-mark.svg, their notice block and the two assetsInlineLimit names. Keep the text labels.
  • Item 8 — one consumer, generalized: recovery._relay_takes_crew_sign_in only forwards to kas_bundle.last_relay_takes_crew_sign_in and has one caller. Subtraction: call last_relay_takes_crew_sign_in directly.

What this change ships

Inventory (9 items) — 6 justified

Intent: A user whose Kiro sign-in is missing or refused learns where to sign in and can do it from the spot that failed. This is a FIX.

  1. KAS's "Access denied. Please check your authentication." turn now becomes a sign-in error row, with the request id shown once — justified
  2. A signed-out chat on the bundled engine offers Sign in before the first message (chat_needs_sign_in) — justified
  3. The error row, Settings card and app notice now show one line and a Sign in button that opens a shared dialog — justified
  4. A Kiro CLI or relay row shows kiro-cli's commands and Check sign-in again (new kiro_cli_sign_in kind) — justified
  5. The signed-out prompts no longer name the engine route — justified
  6. Closing the dialog mid-sign-in cancels the pending login — justified
  7. getting-started.md says where to sign in — justified
  8. A recovery wrapper forwards to last_relay_takes_crew_sign_in — one consumer, generalized
  9. Google and AWS logos on the sign-in choice buttons — undeclared, rides along

[FIRST-PRINCIPLES-REVIEWED] 75b3edc

Description read

[DESCRIPTION-READ] dafd8ab0319e02f31c6a1e443eebe1f98ef7ba2125fec19f94f01e612b5858dd

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 75b3edc56af153fb7cc9433a3bbc14c4171e4793 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the blind reader read every primary Sign in control correctly, and the screenshots cover the dialog, the chat rows, Settings and the app-wide notice.

Notes

  • Settings, signed out (shot-01): SignInBody shows only a bare "Sign in" button, with nothing saying the user is signed out. The reader said "it doesn't say whether I'm signed in right now", and the PR says each spot shows "one line and a Sign in button". Add the one line, e.g. "Not signed in to Kiro".
  • ErrorCard (shot-13): the request-ID copy button is only an icon. The reader had "no idea" what it copies. Give it a visible "Request ID" label, or move it under a details disclosure.
  • use_crew_sign_in "Use the Kiro Crew sign-in" (shot-05) appears next to "Kiro sign-in". The reader asked "are these two different accounts?" Use the same "Sign in" wording as the relay row does elsewhere.

[UX-REVIEWED] 75b3edc

Description read

[DESCRIPTION-READ] bde1da4e5af5bf67caeac5535c5dc3b0b1b3b51159fda706436d4387d75803f2

That sha256 names everything this verdict read: the PR description, plus the 27 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 75b3edc56af153fb7cc9433a3bbc14c4171e4793 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 75b3edc

Verdict parsed from the review's SHA-scoped output markers for commit 75b3edc56af153fb7cc9433a3bbc14c4171e4793.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 75b3edc56af153fb7cc9433a3bbc14c4171e4793 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 75b3edc56af153fb7cc9433a3bbc14c4171e4793 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 75b3edc

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 75b3edc56af153fb7cc9433a3bbc14c4171e4793 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 20% chance that this change introduces a defect, above the 12% limit for approving on its own.

The PR does what it says. KAS's fixed "Access denied. Please check your authentication." sentence now matches the session-expiry check (one exact alternative, with tests that other "access denied" text does not match). Failed turns therefore get the sign-in tags and the request id once. The relay and Kiro CLI-only rows get a new kiro_cli_sign_in kind. Every reader of the old auth_required kind was checked: the backend readers use the exception flags, and the frontend Continue-hiding check and authRequiredIsNewest were extended to the new kind. Surfaces with no sign-in fall back to plain text with Continue hidden. chat_needs_sign_in is decided by the gateway, only for the owner, and answers false on any failure; the route check it calls has no side effects. Both the status reply and the install reply carry it. The sign-in flow moved into useKasLogin.ts, and closing the dialog mid-sign-in cancels the pending login. The shared welcome-screen status hook keeps the welcome screen's polling. The specs and a superseding decision entry are updated in the same change, there are tests for each new behaviour, and all CI checks are green.

Tier: 2, held for a person: changes requested.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 75b3edc56a · 3502 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@CrysisDeu
CrysisDeu force-pushed the fix/auth-denied-sign-in-pointer branch from f3c55f6 to 7a23672 Compare November 13, 2026 22:43
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 13, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/auth-denied-sign-in-pointer branch 3 times, most recently from a85003d to 4d8f123 Compare November 14, 2026 00:22
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 14, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/auth-denied-sign-in-pointer branch from 4d8f123 to 1aeb749 Compare November 17, 2026 05:08
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 17, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/auth-denied-sign-in-pointer branch from 1aeb749 to 3e4167b Compare November 17, 2026 05:41
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/auth-denied-sign-in-pointer branch from 3e4167b to 9f02fcc Compare November 17, 2026 23:34
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@CrysisDeu recorded a pre-existing release (class pre-existing) for the gpt AI finding on 73cc5c2167a42d7d4813f11d3ed0e97a9fff81ad.

The fenced finding (recovery.py reads the process-wide last spawn route, which another chat may have set) is not caused by this diff: main's host_auth signed-out message reads kas_route.last_spawn_route() the same way (host_auth.py lines 1097 and 1221). The owner approved this override; the per-runtime route fix is tracked in #39077.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 18, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. The backend fix is small and well pinned. test_kas_access_denied_sign_in.py covers both KAS frame shapes and includes negative cases, so the new alternation cannot spread. One item blocks this head.

  1. Two changed controls have no screenshot, and the UX lane could not evaluate them.
    • KiroSignInNotice.tsx:151-154: the notice footer used to read "Open sign-in settings" and went to Settings. It now reads "Sign in" and opens KiroSignInDialog in place.
    • KiroSignInCard.tsx:209-212: the signed-out Settings card is now a single kiro-sign-in-open button.
    • The UX verdict on 73cc5c2 says "cannot evaluate: missing" for both. CI filed it as PASS only because the BLOCK had no Trigger or Outcome line. The CI and reviews guide says a verdict the lane cannot reach because evidence is missing is a BLOCK, never a pass.
    • The body has no shot of the notice in any state. Its only Settings shot (#8) shows the dialog over a blurred page, not the card before the dialog opens. The attached shots come from 1f867d73d6 and 069af06a6e, not this head. The set the body says matches this head is not attached.
    • Smallest fix: attach shots taken on this head of (a) Settings, Agent Harness, Kiro sign-in, signed out, before the dialog opens, (b) the "Kiro sign-in expired" notice, and (c) the status-unavailable notice. Then re-run the UX lane.

Optional:

  • transcriptRenderers.tsx:819 and :864: authRequired = isAuthRequired(m) does not cover kiro_cli_sign_in. A signed-out relay row in a split pane, a Bot chat, embed or popout (no onOpenSignIn) gets the error card's Continue back, which main withheld. isAuthRequired(m) || isKiroCliSignIn(m) plus one pane test would close it.
  • status_unavailable_detail still says "Open sign-in settings to check your Kiro sign-in". It now sits above a "Sign in" button that opens a dialog. docs/system-specs/modules/kas-auth.md:841-851 still describes the old button and the deep link. KiroSignInNotice.test.tsx:191 pins the old sentence.
  • recovery.py:318 decides the row kind from the process-wide last spawn route, and this PR adds that consumer. So "pre-existing" undersells it. Tracking it in #39077 is fine.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 18, 2026
KAS words a refused credential as "Access denied. Please check your
authentication.", with no status code or expiry wording, so the turn
showed that sentence alone: no place to sign in, no Sign in to Kiro
button, and the request id twice. The session-expiry vocabulary now
carries that exact sentence, so the row gets the harness's signed-out
message, the sign-in tags and one request id.

On KAS's bundled engine with no usable sign-in, the chat now offers the
sign-in above the message box before a send fails. The gateway decides
(chat_needs_sign_in on GET /api/kas-bundle, owner only, false when
unknown), so the kiro-cli relay never sees it.

The sign-in flow's logic moves into hooks/useKasLogin.ts; Settings,
onboarding and the chat prompt render the same KasLoginEmbedded/
KasLoginGate views from it. getting-started.md names where to sign in.

Refs #36870
@CrysisDeu
CrysisDeu force-pushed the fix/auth-denied-sign-in-pointer branch from 73cc5c2 to 75b3edc Compare November 18, 2026 12:37
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Head is now 75b3edc, still one commit; it merges cleanly with main, so no rebase.

Fixed

  • Continue on a kiro_cli_sign_in row: website/src/pages/chat/transcriptRenderers.tsx:822 adds withholdContinue = authRequired || isKiroCliSignIn(m), used only by the Continue condition at :867. authRequired itself and the sign-in handler passed to the error card are unchanged, and every other row kind keeps main's Continue rule. New test: website/src/test/transcriptRenderers.test.tsx:910, a pane that passes no onOpenSignIn gets no Continue on that row.
  • Untrue copy: components.kiroSignInNotice.status_unavailable_detail now reads "Sign in again if your Kiro sign-in stopped working, or ask the agent to look into it." in en.manual.json:5022 and all 11 translated catalogs, with en-XA.json regenerated. docs/system-specs/modules/kas-auth.md (the notice section, around 842-856) now says Sign in opens the dialog in place with no deep link or leave-guard prompt, and that this row's Continue is withheld on every surface. website/src/test/KiroSignInNotice.test.tsx:191 asserts the new sentence.
  • src/kiro_crew/dashboard/chat_turn/recovery.py:318: the note is a plain present-tense comment (the route read is the process's last KAS spawn, not this turn's own). The comment-history gate refuses an issue number in an added comment, so the Signed-out sign-in prompt reads the process-wide last spawn route, not the failing runtime's #39077 reference is in the PR body instead.
  • website/scripts/capture-kiro-sign-in-notice.mjs was stale against this PR's copy and dialog; it now checks the new sentence, that Sign in opens the dialog without changing the URL, and a new signed-out Settings frame that asserts no notice of any kind shows.

Screenshots on this head are in the body under "This head": (a) Settings > Kiro account signed out, (b) the sign-in expired notice, (c) the status-unavailable notice, all from that harness on 75b3edc. The older shots are labelled as older heads. No images are committed.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 18, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 18, 2026 14:38

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving head 75b3edc. This review checked the backend sign-in fix (the access-denied alternation and its negative tests in test_kas_access_denied_sign_in.py), the harness tags (positive identity, KAS only for the relay branch in recovery.py), the owner gate on chat_needs_sign_in, and the cancel-on-close path in useKasLogin.ts. PR Readiness is green on this head, and every AI review lane passes on it.
Earlier change request, item by item: (1) the screenshots taken on this head are now in the body under "This head" (the signed-out Settings card, the expired notice and the status-unavailable notice), and the UX lane passes on this head, so this item is fixed. The optional Continue gap is fixed at transcriptRenderers.tsx:822, with a pane test. The notice copy and kas-auth.md are updated, and the route note is tracked in #39077.
Security: chat_needs_sign_in goes only to the owner and answers false when the store, config or route cannot be read. The new path stores no new credentials. A dialog closed while its begin request is still in flight cancels the late login and opens no tab.
Done well: the login state machine now lives in one hook, and one shared dialog uses it, instead of a copy on each surface.
The design is signed off under the standing maintainer sign-off for changes by team members.

Optional:

  • KiroSignInPrompt.tsx:41 hides the prompt whenever a sign-in is stored, even an unusable one (expired, or its refresh was refused). The gateway still reports that the chat needs sign-in in that case. Hiding only when the stored sign-in is usable, and passing reauth to the strip, would close the gap. A test with {authenticated: true, usable: false} would pin it.
  • Some code from the old flow no longer runs: the renderReauthCancel slot and its branch in KasLoginGate.tsx, cancelReauth in useKasLogin.ts, and the openKiroSignIn navigate callback that ErrorCard only checks for truthiness. Deleting them and updating the two prop docs would remove the dead paths.
  • The Google and AWS marks, their notice block and the vite inline-limit entry are not needed for the Goal. The existing icons would do the same job.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 18, 2026
@KiroCrewCaptain
KiroCrewCaptain merged commit d4e7e9f into main Nov 18, 2026
103 of 107 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/auth-denied-sign-in-pointer branch November 18, 2026 14:56
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Access denied chat error does not say where or how to sign in to Kiro

2 participants