Repository navigation
fix: show provider guidance when ACP agents fail without a reply - #156879
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 23, 2026, 9:24 PM ET / September 24, 2026, 01:24 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch shows curated provider guidance when an ACP harness ends without a reply, revises unavailable-model recovery text, and updates runner tests and troubleshooting docs. Merge readiness⛔ Blocked before merge - 2 items remain Current main still gives a generic warning for an ACP harness failure without a reply. The branch addresses that path, and the earlier model-recovery finding is fixed. The PR remains open because its corrected wording has not yet been captured in a live ACP conversation, as the author explicitly requires. Priority: P2 Review scores
Verification
How this fits togetherThe embedded agent runner receives an ACP harness result and prepares the reply delivered through the Gateway to the originating conversation. For a failed turn with no assistant text, it chooses either safe provider guidance or a generic warning. flowchart LR
A[ACP conversation] --> B[Agent harness]
B --> C{Assistant reply available?}
C -- No --> D[Classify terminal error]
D --> E[Guidance or generic warning]
E --> F[Conversation reply]
C -- Yes --> F
Before merge
Agent review detailsSecurityNone. PR surfaceSource +17, Tests +92, Docs +5. Total +114 across 12 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the shared provider-error copy at the runner’s terminal boundary while preserving generic text for unknown failures and the warning about possible tool actions. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main returns generic text for a terminal harness error without an assistant reply, and the branch registers focused runner cases for that path. This read-only review did not execute the case. Is this the best way to solve the issue? Yes, subject to the pending live capture. Reusing the existing failure classifier and copy owner is a narrow fix, and the revised model advice matches ACP's session-level model control. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 57f912b5f701. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Addressed the review finding about global-default recovery guidance in c5832f1. The shared copy now offers selecting an available model or updating model configuration; it no longer requires changing The existing corpus regression failed before that correction and passes afterward, along with the registered runner cases. Final live QA reproduced the original provider failure, displayed the corrected guidance, then recovered through the same conversation's model picker in two seconds. The complete configuration remained byte-identical. The PR body includes inspected before/after screenshots and the test evidence. The subsequent CI failure was three stale expected-prefix assertions in two Gateway suites. Commit 9c53e97 updates those assertions only; all five Gateway cases and scoped lint pass. Production bytes are unchanged from the live-proven correction. |
|
Merged via squash.
|
…nclaw#156879) * fix: show provider guidance when ACP agents fail without a reply * fix: offer model selection for unavailable model recovery * test: align Gateway model recovery guidance assertions
What Problem This Solves
Fixes the generic “Agent couldn't generate a response” message when an ACP agent ends with a known provider rejection and produces no assistant message.
User Impact
Users receive safe, actionable guidance for the provider failure. An unavailable-model error offers selecting another model or updating the model configuration, without incorrectly requiring a global-default change. Warnings about possibly completed tool actions remain visible, and unknown provider diagnostics retain the generic error message.
Why This Change Was Made
The agent adapter already preserved the terminal error, but incomplete-turn presentation replaced it with generic text. This reuses the shared provider-error classification and curated copy for that path, moving the existing classification helper to its owning agent module and updating all callers. Retry, fallback, and error metadata behavior remain unchanged.
Live QA also proved recovery by selecting a different model in the same conversation while the global configuration stayed byte-identical. The shared model-unavailable copy now accurately describes that recovery option. Model catalog eligibility is outside this fix: the observed provider rejection does not establish whether the model was unsupported or inaccessible to the account.
Evidence
The registered agent runner reproduced the original defect before the fix: both known-error cases failed on generic copy, while both unknown-error controls passed. The four cases now pass with and without possible tool side effects. Live QA confirmed that provider guidance reaches the original conversation, and switching its selected model restores replies without changing global defaults.
The original fix passed 878 tests across six files on a frozen-lockfile install (131.774 seconds for the five-file group, plus 13.993 seconds for the original eight-case payload-resolution sibling). Production core and agents-other type checks, scoped lint, formatting, import cycles, conflict markers, line caps, and assertion safety passed.
The final wording correction first failed the existing corpus regression on the global-config mandate. Current-head proof passes all 664 corpus/copy tests in 3.584 seconds, plus the four registered harness cases in 24.613 seconds including 12.190 seconds of required worker preparation. Those four case bodies total 807 milliseconds; no cases were added. Four-file lint passes in 16.445 seconds, and fresh full-candidate independent review found no actionable P0–P2 findings.
CI then exposed three Gateway assertions still expecting the former wording. The test-only follow-up updates those expectations; both existing Gateway suites pass all five cases in 62.054 seconds, with scoped lint passing in 17.727 seconds and fresh independent review clean. No production behavior, fixtures, or test count changed.
An initial static attempt exposed a stale copied Clack installation; reconciling this isolated checkout with its frozen lockfile fixed the setup without a source workaround. Tests were rerun afterward. The first replay selected a nearby seven-case terminal-metadata suite instead of the original eight-case payload suite; the latter was then run separately to complete the intended coverage.
Final live proof on the candidate containing this exact production patch shows the corrected selected-model guidance in the original conversation. Selecting an available model in that same conversation then returned the requested synthetic reply in two seconds (23 output tokens). The complete configuration remained byte-identical to its pre-test backup. The inspected captures below contain synthetic QA content only.