Repository navigation
Recover Codex slots after verified spawn rejection (T26) - #168
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #167
Sage task T26
A rejected initial Codex spawn no longer leaves its Sage slot occupied when the protected native transcript proves the supported unknown-model rejection. The same sender can then prepare and dispatch a new child. Other errors or any successful-child evidence retain capacity.
Core stores an exact, immutable failure receipt separately from completion. Changed evidence, bound assignments, and late binding refuse. Codex reconciles before a new admitted spawn and after native list/wait callbacks. This also recovers preserved work after Sage is off. Source changes are in
packages/sage-core/andpackages/sage-codex/runtime/; generated plugins come from the build. Claude's active state-tool and hook files are unchanged.Validation at
16a8efa900a785f498f6ab590bd52f648a5804b9:npm run build: built 278 files.npm run check: all checks pass.git diff --check: clean.node --test scripts/codex-server.test.mjs: 104 tests, 104 pass, 0 fail.7720032. Core failures show the missing receipt API; adapter failures show the missing reconciliation.node scripts/probe-codex-lifecycle.mjs --sage-failed-spawn: actual CLI 0.160.0, simulated model responses. At capacity one, one rejected spawn produces one failure receipt; a new child then binds and completes. Final counts: two reservations, one failure, one binding, one completion. Temporary profile removed.failed_dispatch_not_reconciledand remove their temporary profile.node scripts/probe-codex-lifecycle.mjs --sage-receipt: existing report-receipt route passes and removes its temporary profile.npm test: 1,093 tests; 1,093 pass; 0 fail, cancelled, skipped, or todo. Exact-head CI run 38403246109 reports the same counts.Every test/probe uses fake
ps,pgrep, andkillfirst on PATH. Attack strings reach parsers only.Not verified: other rejection kinds, later assignments, cross-session recovery, real-model behavior, a real-project pilot, or installed automatic enforcement. Automatic Sage remains incomplete; see #88.