Repository navigation
fix(acp): classify kiro-cli's "failed to process the request" as transient - #11875
bolichen97 merged 1 commit into
Conversation
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Unattended turns that fired any tool now die on the first transient 5xx — and a higher-layer whole-turn retry would re-run the mutation anyway. WatchThe guard extension ("Any fired tool call makes a later transient error terminal on that path") removes same-model transient resilience for essentially every agentic unattended turn — workflow agents ( SuggestionsAs a follow-up, port the interactive path's continue-instruction recovery (re-queue "continue" on the same live session, not the original prompt) into [DESIGN-REVIEWED] 62052b1 |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The PR's own rule ships half-applied: the model-rejected replay (Case 2.5) still re-runs the original prompt after a fired tool call. Not justified as shipped
What this change shipsInventory (6 items) — 5 justifiedIntent: FIX — make kiro-cli's "failed to process the request" wrapper auto-retry like its sibling transient errors instead of ending the turn (Closes #11873).
Item 3 reverses the base pin ("pre-existing semantics, deliberately untouched"), but the pin's own message names the double-mutation harm and distinguishes Case 2 only by replay count, and the description declares the reversal with base-failing regressions — supported, not silent. [FIRST-PRINCIPLES-REVIEWED] 62052b1 |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed Review detailsAdvisory only — the extended tool-activity block turns a momentary backend blip into a hard failure for unattended tool-using turns. FINDING — src/kiro_crew/llm_helpers.py:2376 — [OPUS-REVIEWED] 62052b1 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
|
Disposition for F1 (fenced, BLOCKING): transient replay can duplicate completed tool mutations. The adjudicator flagged it as an edge case that cannot occur. The same surfaces on this branch confirm that. The new pattern only marks the error transient; it enters the retry ladders
A tool that ran before the wrapper arrived therefore lands in the post-token or
|
2cdca79 to
145f694
Compare
|
Board note: rebased onto main with #11876, which fixes the resolver-consumer parity test behind |
145f694 to
4019c28
Compare
|
Board note: both review lanes reported "review incomplete" on |
|
Board note: the two lane failures on this head are a repo-wide outage, not a verdict. Every fork lane run since about 22:42Z ends |
4019c28 to
5d362b1
Compare
|
Rebased locally onto current |
5d362b1 to
b9b874e
Compare
|
All four fork workflows on this fresh head are still waiting for the maintainer approval click and none has started. Please approve the workflow run so the new head can receive a current review/readiness verdict. |
|
Windows shard 1 failed the known unrelated risk-annotation timing test with the exact #12376 signature ( |
…sient so the turn retries Closes kirodotdev#11873
b9b874e to
62052b1
Compare
|
Fresh exact head |
…sient so the turn retries (kirodotdev#11875) Closes kirodotdev#11873
Problem / Motivation
When the model backend returns kiro-cli's wrapper
The service failed to process the request (request_id: ...), the dashboard chat ends the turn with a terminal error card and no retry. Sibling transient 5xx failures recover automatically, so this wrapper makes people click Continue and stops unattended work.Why it matters
This wrapper reports a momentary backend failure. Retrying is useful before any output or tool work occurs, but replaying the original prompt after a tool mutation can execute that mutation twice.
What changed (motivation → approach → change)
src/kiro_crew/acp/client.pyadds_RE_PROCESS_FAILEDbeside the existing generate-failed and 5xx classifiers. It is scoped to structured errordata, preserves auth and malformed-request precedence, reportsProviderErrorClass.RETRYABLE, and formats the error with itsrequest_idand retry guidance.src/kiro_crew/llm_helpers.pyadds the lower-case marker so raw and formatted forms use the same retry decision.Unattended same-model and fallback-chain retries replay the original prompt only before any assistant text or tool call has occurred across all attempts. One sticky tool-activity flag now gates both retry paths. A textless completed tool call makes a later transient error terminal instead of replaying the mutation. Prompt-busy keeps its existing retry contract, but tool activity from that attempt remains sticky if a later attempt hits a transient error.
docs/system-specs/modules/providers.mdrecords this boundary.Backwards compatibility
Compatible: one additional wrapper is retryable before output or tool activity. Existing auth, validation, partial-output, prompt-busy, and fallback verdicts stay unchanged. A completed tool call intentionally prevents original-prompt replay.
Tests
test/test_acp_client.pycovers raw classification, provider classification, formatter wording,request_idretention, structured-data scoping, and auth precedence.test/test_llm_helpers.pyproves a transient error before tool activity still retries, a textless mutation blocks same-model and fallback replays, and activity remains sticky across a prompt-busy attempt. The complete nine-file ACP/LLM set passes 1,042 tests. Both no-replay regressions fail at pytest call phase on reviewed head97cdbbfb4. Full mypy passes 1,706 files, and all Black, isort, flake8, history, brand, subprocess, Agent SDK, async, changelog, docs, diff, body, and single-commit gates pass.Manual verification
N/A — unit coverage drives the raw classifier, formatter, retry loop, prompt-busy transition, and fallback chain directly without performing real tool I/O.
Screenshots / video
N/A — no user-visible UI changes.
Related Issues
Closes #11873
Pattern harvest
Rule candidate: review-prompt
Pattern: an original-prompt retry must require both no emitted text and no fired tool call across every prior attempt.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)