Repository navigation
Conversation
Selectively backport the session-retirement error-class correction from openclaw#181204 to release/2026.10.10, preserving active-thread ownership checks.
|
🦞👀 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 real behavior proof before merge. What this changesThis PR classifies busy Codex session retirement refusals as globally scoped preflight errors while preserving existing ownership checks. Example: Deleting session-before-deletion while its native Codex thread remains claimed.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this is a focused, correct backport of an accepted main correction, and the release branch still needs the error-class change. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherSession deletion and history mutation invoke the Codex harness retirement participant, which checks native thread ownership before allowing the session transaction; core fallback separately recognizes globally scoped preflight errors. flowchart TD
A[Session deletion or history mutation] --> B[Harness retirement participant]
B --> C[Native thread claim check]
C --> D[Global preflight refusal]
C --> E[Session transaction when idle]
D --> F[Calling operation receives error]
Technical reviewBest possible solution: Retain this minimal producer correction and validate the claimed-thread refusal through a supported deletion or history-mutation entry point. Do we have a high-confidence way to reproduce the issue? Source establishes the release branch's ordinary-error refusal and the corrected producer contract; a supported retirement-to-fallback reproduction remains unestablished, and no target code was executed during this review. Is this the best way to solve the issue? Changing the error at its existing producer is the smallest complete correction for the stated classification contract and matches accepted main behavior without adding fallback policy or another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fbb9bc44e8c6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +7. Total +8 across 2 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 31, 2026, 3:37 PM ET / 19:37 UTC (Revision 2). |
|
I checked the supported reset, deletion, rewind/branch-switch, and initialization-cleanup callers on The source-runtime CLI build passes, and the producer and fallback boundary tests remain valid separate evidence. I updated the PR body to keep the shipped-entry-point gap explicit. I have not requested another review, because that proof is still missing. If a maintainer can point to the intended supported calling path for this condition, I can target the live trace there. |
|
I audited the requested shipped-entry-point trace on the exact reviewed head
Incognito exception: this distinction does not cover every reset. The focused backport remains appropriate as error-contract consistency with the merged main correction. However, I cannot honestly supply the requested combined Gateway trace without identifying a supported caller/sequence carrying the refusal into fallback or artificially joining independent boundaries. I have not altered the public reset flow or bypassed its admission checks to create such a trace. Could the proof requirement be scoped to the actual deletion/history-mutation boundary, or can a maintainer identify the supported caller that carries this specific claimed-thread retirement refusal into an eligible fallback chain? The existing contract tests are not claimed as that missing shipped-entry-point proof. Fresh exact-head Linux checks: session-retirement 9/9 and fallback terminal-boundary 16/16 passed; both repository wrappers exited 0. An independent source review confirmed the distinctions above, without claiming an exhaustive impossibility proof. The title and impact description now state the actual error-classification contract rather than an unproven end-to-end reset claim. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Published 10.10 follow-up: the release notes credit #181204, and the published warm-thread refusal is already typed. The retirement sibling still throws an ordinary This PR is the remaining narrow release backport, preserving the busy-thread guards and using global preflight classification. The successful installed-port checks do not prove the previously requested retirement-to-fallback trace. Could a maintainer assess this as error-contract consistency with the merged main fix, or identify the supported caller needed for that combined trace? No ordinary-reset fallback claim is made. |
Related: #181046
Selectively backports the session-retirement correction from #181204 to
release/2026.10.10.What Problem This Solves
Fixes a claimed Codex thread being reported as an ordinary execution error when a session deletion or context reset is refused.
User Impact
Classifies the refusal as a model-independent preflight failure while preserving its original diagnostic, active-thread claim, binding, and ownership checks. If propagated to the core fallback owner, that unscoped preflight failure stops before the next candidate. The producer-to-fallback composition has not been demonstrated at a shipped entry point; the evidence below keeps that gap explicit. No configuration or migration is required.
Why This Change Was Made
The release branch already uses
AgentHarnessPreflightErrorwhen releasing a busy retained thread, but its session-retirement path still throwsError. Use the same globally scoped preflight contract at that remaining producer. This is the error-class portion of the merged fix; it does not remove an adoption guard or add harness-local scope.Published 2026.10.10: partial inclusion of #181204
The release notes correctly credit #181204 for stopping model fallback when a policy change encounters a busy Codex thread. The published tag contains the typed refusal in thread-lifecycle-warm.ts, but session-retirement.ts still throws an ordinary
Errorfor a claimed thread.This release backport changes only that remaining retirement producer to the existing unscoped
AgentHarnessPreflightError. It does not reapply the warm-thread correction, remove an adoption guard, or add harness-local scope. Please evaluate it as completion of the release's error-classification contract, rather than as a new claim that ordinary Gateway reset triggers model fallback. The shipped retirement-refusal-to-fallback composition remains unproven, as detailed below.Evidence
Additional published-release check — November 3, 2026
The remaining error-class correction was included in a selective port installed on official 10.10 packages on macOS and Linux. The combined port's 50 focused checks passed, including the nine session-retirement cases. A successful live parent/child continuation on those installations is operational continuity evidence only: it did not trigger the claimed-thread retirement refusal or prove suppression of a subsequent model candidate. The exact-head contract checks and the unresolved shipped-entry-point gap below remain the evidence for this PR.
Error. With the correction, deletion and context reset both return an unscopedAgentHarnessPreflightErrorbefore mutation; the binding and active claim remain, and no session transaction or native request runs.git diff --checkpass. The full plugin lane was also attempted; its pre-existing local failures are described below.06d598c818155a5ac6ad00c9611bbb4b6ed57d45, P0–P2: no actionable findings. The reviewer inspected code; tests were executed separately.This proves the producer contract and the existing fallback owner's terminal behavior with controlled fixtures. A live network fallback was not deliberately triggered.
Local plugin-lane result on macOS:
pnpm test:extension codex --maxWorkers=6exits 1 in its 433-file batch: 5,053 passed, 3 failed, 1 skipped (460.86 s including preparation). The wrapper announces 439 discovered test files; the actual Vitest summary reports 433 executed files. The three failures also reproduce without this session-retirement change, using identical Codex sources from the release base:transport-startup.test.tscases fail while observing native descendants, withProcessInspectionError(reason: "permission"). The unchanged file reproduces 2 failed / 2 passed.thread-shell-environment.native.test.tscase expects an empty Git identity after shell-environment filtering but observes a nonempty identity. The unchanged file reproduces 1 failed / 3 passed.These failures were retained and were not hidden with retries, skips, relaxed assertions, or timeout changes. They do not exercise session retirement; the 9 changed-owner cases and 16 fallback-consumer cases pass. This is not a clean full local plugin run.
Remaining runtime proof: the shipped CLI source-runtime build and help entry point pass on this head. An audit of the supported reset, deletion, rewind/branch-switch, and initialization-cleanup callers did not establish a faithful live reproduction of this particular retirement refusal inside an eligible model-fallback chain. Normal reset cancels and retires work first; rewind/history mutation rejects competing work before this participant. Those RPC handlers are outside
runWithModelFallback. The producer-to-fallback connection remains unproven at a shipped entry point; the tests above establish those contracts separately. No cancelled reset, injected native claim, or run without eligible fallback candidates is presented as that missing proof.Exact-head production-path clarification (2026-10-31)
A fresh Linux source audit distinguishes persistent-session reset (
AgentHarness.reset→retireCodexAppServerSessionGeneration) from history context reset (withSessionContextReset→ this changed deletion producer). Ordinary persistent-session Gateway reset drains work before harness cleanup; history mutation rejects live source work before native context preparation. The mutation RPCs are not a fallback runner. Consequently the combined shipped Gateway reset-refusal → next-model suppression trace remains unestablished; no modified reset flow, injected claim, or artificial combination of boundaries is presented as that proof. A maintainer needs to identify the intended supported caller, or scope acceptance to the actual retirement boundary. See the companion technical clarification comment for exact-head source locations.Incognito exception: this distinction does not cover every reset.
session-reset-service.ts:656–667routes incognito reset throughdeleteIncognitoSessionForReset;session-reset-incognito.ts:61invokesdeleteSessionEntryLifecycle, and the memory lifecycle owner (session-accessor.memory-lifecycle.ts:121) enterswithSqliteSessionDeletions. Thus an incognito reset can reach the changed deletion hook, after admission drain and harness cleanup. This path still does not establish propagation into an eligible model-fallback chain. Generic maintenance/prepared-write/cleanup callers also exist and are not ruled out by this scoped audit.Fresh isolated Linux checks (2026-10-31)
On unchanged exact head
961110a9a073e9c133fb624f17f3e758bf96151a, Node v24.22.1 and pinned pnpm 12.15.0: session-retirement 9/9 passed (384.30 s including worker preparation), fallback terminal-boundary 16/16 passed (345.72 s including worker preparation). Both repository wrappers exited 0. These are separate production-owner contract tests, not the missing combined live trace. Independent read-only source review confirmed the persistent/incognito distinction and broader cleanup callers; it did not establish the combined fallback flow. No production Gateway, data, or installed packages were changed.