Repository navigation
Conversation
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that [DESIGN-REVIEWED] e7cb20c Description read[DESCRIPTION-READ] 71aca3778ee88a7669e78ebcc34227b3a7ea25a2eef8c156176ab3f36e24e1ba 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 |
First Principles Review (Opus 5.5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The Not justified as shipped
What this change shipsInventory (5 items) — 4 justifiedIntent: a Claude/Bedrock backend whose credentials went stale gets one fresh process instead of failing every turn. This is a FIX (#19262).
[FIRST-PRINCIPLES-REVIEWED] e7cb20c Description read[DESCRIPTION-READ] 4dbd6d16310cd07988d1e68eeff3df614c62bfe50e79558fb9d5c28525c680cf That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
ea1139c to
a207501
Compare
|
a207501 to
6c6c18e
Compare
6c6c18e to
881e559
Compare
…redentials A Claude backend that could no longer load its AWS credentials answered every turn with errorKind cloud_credential_error, and every surface sent the next turn to the same process, so the session kept failing until the user reset it. The error is now tagged credential_reload from the frame's structured errorKind, and acp_error_needs_fresh_backend treats it like a lost session: dashboard chat, subagent runs, channel turns, cron and cron-sequence steps, subagent completion injection and Slack threads reset the session and retry once on a fresh runtime, with the existing one-retry budget and no replay after a tool ran. Dashboard chat and Slack say the credentials could not be loaded and, when the retry also fails, tell the user to refresh them. The error-handling spec describes the rule. Fixes kirodotdev#19262
881e559 to
e7cb20c
Compare
|
Closing this in favor of #19293, which fixes #19262 the same way and was opened first. I missed it before opening this one. One difference in case it's useful for #19293: this PR gave dashboard chat and Slack credential-specific text instead of the session-not-found wording. The retry notice said the agent could not load its cloud credentials, and the give-up told the user to refresh their credentials, since a restart can't fix an expired credential. |
Problem / Motivation
Goal: A Claude backend that can no longer load its cloud credentials gets one fresh process instead of failing every turn until someone resets the session by hand.
A long-lived Claude Code backend on Bedrock can end up unable to load AWS credentials while a newly started process loads them fine. Every prompt then fails with
errorKind: cloud_credential_error, and every surface sends the next turn to the same process. In the case in #19262, a monitor loop failed 20 times over about 5.5 hours, while a new chat opened in the same window worked first time.Why it matters
Anyone running the Claude backend with a credential helper hits this when the in-process credentials go stale. Interactive chats keep failing until the user resets them. Loops burn every cycle until they stand down after 5 failures. Subagents, cron jobs and Slack threads fail the same way.
Not a goal
What changed (motivation → approach → change)
The frame already says what went wrong: its
datacarrieserrorKind: "cloud_credential_error". On main,_raise_acp_errorinacp/transport_errors.pyignored it, so the error was a plain non-retryableAcpErrorthat nothing treated as a reason to replace the backend. The remedy is the same as for "session not found": the process answered, but only a fresh one can recover._raise_acp_errornow setscredential_reloadfrom that structured field only.llm_helpers.pyaddsacp_error_is_credential_reload(the tag, with a text fallback for an error that was re-wrapped) andacp_error_needs_fresh_backend(either cause). Every surface that recovers a lost session decides through the new predicate:dashboard/chat_runner.py)subagent_manager/run.py, with the binding insubagent.py)channel.py)slack/gateway.py)slack/handler.py)Dashboard chat and Slack show credential-specific retry and give-up text. The give-up tells the user to refresh their credentials, because a second failure means a restart did not help. The other surfaces already append the backend's own error, which names the credential failure.
docs/system-specs/common/error-handling.mddescribes the rule.Backwards compatibility
Compatible: session-not-found handling is unchanged. The new predicate matches everything the old one matched, and every surface keeps its retry budget and side-effect gates.
Removes nothing: a frame without the structured
errorKindis classified exactly as before.Tests
test_acp_cloud_credential_recycle.py:errorKindsets the tag. A different kind, nodata, the kind only inside a stringdata, or only in the message does not.acp_error_needs_fresh_backendmatches a credential error, a re-wrapped credential error and a lost session, and nothing else.test_session_not_found_surfaces.pyruns every surface test twice, once with a lost session and once with the real credential frame. The Slack tests expect the wording for the cause under test. On main, 19 of the 23 credential variants fail; the other 4 check outcomes main already gets right, such as no replay after a tool ran.Manual verification
N/A. The tests drive each surface with the adapter's real frame shape. The live failure needs credentials to go stale inside a running process, which I can't reproduce on demand.
Related Issues
Fixes #19262
Pattern harvest
Rule candidate: review-prompt
Pattern: an adapter frame's structured
datafield (such aserrorKind) ignored in favour of matching message text.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)