Repository navigation
fix(agents): fallback after replay-safe silent errors - #117356
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 11:29 AM ET / 15:29 UTC. ClawSweeper reviewWhat this changesThe PR lets an embedded agent try configured model fallbacks after three replay-safe assistant errors with no visible output, without classifying credential-file text as an auth-profile failure. Merge readinessThis PR remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherThe embedded-agent runner receives a terminal assistant result, decides whether retrying is safe, and then either surfaces the failure or asks the shared model-fallback runner to try the operator-configured alternatives. This change affects the handoff after the runner's bounded same-model retry budget is exhausted. flowchart TD
A[Provider assistant result] --> B[Embedded agent terminal failure handler]
B --> C{Visible output or side effects?}
C -->|Yes| D[Preserve normal error path]
C -->|No, replay-safe| E[Bounded same-model retries]
E --> F{Retries exhausted and fallbacks configured?}
F -->|Yes| G[Shared model fallback runner]
F -->|No| D
G --> H[Next configured provider and model]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +13, Tests +202. Total +215 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land this focused assistant-terminal-owner repair with the existing replay-safety guard and configured-fallback requirement intact, so silent failures recover without rotating or cooling down unrelated auth profiles. Do we have a high-confidence way to reproduce the issue? Yes, from source with high confidence: current main retries a replay-safe silent assistant error but does not escalate the exhausted unclassified case to the configured fallback decision. The PR supplies exact-head focused regression proof, although this read-only review did not execute a live provider reproduction. Is this the best way to solve the issue? Yes. The repair stays at the assistant terminal-failure owner, carries forward the existing replay-safety fact, and uses the established fallback mechanism; classifying credential-file text as authentication would wrongly mutate healthy auth-profile state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7bcbe743bd42. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Maintainer decision: accepted. After the existing three bounded same-model retries, a replay-safe unclassified silent failure may use an operator-configured fallback model. That can change provider routing and cost, but it is preferable to returning an invisible terminal failure; the route remains opt-in through configured fallbacks, does not run after current-attempt side effects, and does not mutate auth-profile state. Proceed once exact-head required CI is green. |
* origin/main: (99 commits) test: consolidate agent tool suites (openclaw#117886) fix: remove duplicate plugin CLI registry mock (openclaw#117894) fix(gateway): resume shared terminal after slow viewer leaves (openclaw#117847) refactor(gateway): remove deferred channel load flag; 503 plugin routes until runtime ready (openclaw#117852) test(agents): consolidate OpenClaw tool suites (openclaw#117870) fix(ci): repair release validation regressions (openclaw#117723) fix(media): reject empty generated assets (openclaw#117875) fix: release channel delivery resources reliably (openclaw#117855) refactor(cli): unify config-guard policy across dispatch paths (openclaw#117880) test: consolidate WhatsApp monitor suites (openclaw#117854) fix(heartbeat): retain configured account for accountless commitments (openclaw#117521) fix(agents): cap DeepSeek DSML recovery buffer at 256 KB (openclaw#117175) [AI] fix(line): downgrade row-overflow tables to ordered bullet text (openclaw#117481) fix(agents): fallback after replay-safe silent errors (openclaw#117356) fix(telegram): serialize approval ingress sessions (openclaw#117861) fix(agents): report truthful embedded startup stages (openclaw#117879) test(sqlite): align flip-proof request budgets (openclaw#117878) fix(ui): advance gateway-owned channel setup progress (openclaw#117877) fix(media): preserve canonical attachment facts across every agent owner (openclaw#117841) test(protocol): consolidate validation fixtures (openclaw#117873) ...
Co-authored-by: wenri <[email protected]>
Closes #112226.
Source PR: #117208
This maintainer replacement preserves wenrizc's authored source commit. The source fork branch was repeatedly force-rebased after exact-head maintainer proof, including after an explicit coordination request, so it could not remain frozen long enough to land safely.
What Problem This Solves
A provider can return a terminal assistant error with no visible output while leaving the payload unclassified, as in the reported credentials-file
ENOENT. The embedded runner retries the same model three times, then currently returns the invisible error result instead of consulting configured model fallbacks.Why This Change Was Made
After the existing three bounded same-model retries, an unclassified replay-safe silent failure selects the canonical
fallback_modeldecision with reasonunknown.The repair stays in the assistant terminal-failure owner, does not infer authentication from filenames, does not mutate auth-profile state, and refuses fallback after replay-unsafe tool activity.
The release-owned changelog entry from the source branch was removed.
User Impact
Configured fallbacks can recover an otherwise silent failed turn after bounded same-model retries. Replay-unsafe attempts and auth-profile state retain their existing behavior.
Evidence
Exact head:
51c8ceb4d2c4c3e57704b58ee7657f5d93e7e088992aa458aba5258eab425a32ea66695b17382f21: clean, no P0/P1 findings, correctness 0.86git diff --check: cleanDirectly inspectable redacted proof:
Production delta: +33/-20 lines (+13 net). Test delta: +202 lines.