Repository navigation
fix: keep session-read failures from switching models - #188080
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: needs maintainer review before merge. What this changesThis PR classifies session-entry read invalidation as local coordination failure so it cannot trigger another model candidate. Example: The ordered reader loads the saved input “Plan the museum visit” while a native writer changes the session label to “Planning”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it narrowly repairs a current fallback-classification defect, and maintainer authorship also protects it from cleanup closure. No introduced correctness or security defect was found; required CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe agent fallback layer receives errors from session preparation and provider execution, classifies them, and either preserves a local failure or advances to a configured model candidate. flowchart TD
A[Session reader] --> B[Error transport and wrappers]
B --> C[Coordination classifier]
C --> D[Model fallback runner]
D -->|Local coordination error| E[Preserve original failure]
D -->|Eligible provider failure| F[Next configured model]
Technical reviewBest possible solution: Merge this minimal classifier repair after required CI succeeds, retaining reader-owned recovery and genuine provider fallback. Do we have a high-confidence way to reproduce the issue? Current source establishes the native invalidation producer, missing main-branch classification, and fallback path; the author reports base-red/head-green production-owner coverage, while this read-only review executed no target code. Is this the best way to solve the issue? The existing coordination classifier is the correct owner, and adding this identity is the smallest complete repair without changing read admission, bounded recovery, or provider policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5055329484a2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +96, Docs +4, Other +2. Total +103 across 5 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 30, 2026, 12:37 AM ET / 04:37 UTC (Revision 2). |
cafdd81 to
726374d
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: session read invalidation no longer consumes a configured model fallback. |
Keep session read invalidation from consuming a configured model fallback while preserving existing recovery. Fixes openclaw#188064.
Backport the existing coordination-error identity without changing reader recovery, provider policy, or persistent state. Source: 80b9e7b Co-authored-by: RomneyDa <[email protected]>
Fixes #188064
What Problem This Solves
A local session-read consistency failure could consume the next configured model fallback. The fallback runner treated
SessionEntryChangedDuringReadErroras an unknown provider failure, even though switching models does not repair the underlying local read. A successful fallback could conceal that incorrect routing.User Impact
Session-read failures now retain the selected model and propagate through the existing local failure path. Existing bounded recovery stays with the reader, including the final serialized transcript read used after repeated contention. If a read still cannot be accepted, the conversation retains its existing check-before-retry guidance and accepted input remains available to a fresh authorized continuation. Genuine provider failures continue to use configured fallback.
No retry policy, configuration, credentials, storage format, or permissions change. This correction does not claim to fix the producer of every session-read conflict.
Why This Change Was Made
The existing runtime-coordination classifier already owns this distinction. Adding the named exception there keeps fallback decisions, embedded prompt handling and diagnostics aligned, including errors preserved through worker serialization and cleanup wrappers. The implementation adds one production entry, with no additional recovery mechanism.
Evidence
runWithModelFallback. A metadata change invalidates the prepared snapshot before consumption. On base8dad19d8b7b, the runner incorrectly completes on the configured fallback with reasonunknown. With the fix, the original local error propagates, no fallback is attempted, and a fresh admitted attempt reads current metadata and the original committed input on the selected model.