Repository navigation
Keep Codex child work and recovery on current targets (T55) - #222
Merged
Merged
Conversation
This was referenced Oct 14, 2026
erickb336
marked this pull request as ready for review
October 14, 2026 04:47
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 #220
Sage task T55
A Codex child in active Sage mode cannot continue tools when its saved run ends, changes target, or belongs to a held task. The policy checks before and after an awaited evaluator. Recovery also checks the saved review commit, round and cycle before returning instructions or recording new success after compaction.
A recorded completion remains historical evidence. Authoritative interruption stays separate from success. Ordinary tool checks validate the saved run; this change does not claim review-commit checks for every uncompacted tool call. Native completion does not accept a review verdict.
Sources:
packages/sage-codex/runtime/. Generated plugin copies came from the build. No core, state-tool or Claude changes.Validation at
44a5c9d07e1aaf05b9b1e894e99ba508931ab3d8:npm run build:built 294 files.npm run check: all checks pass.node --testrun:tests 21,pass 21,fail 0.node scripts/probe-codex-lifecycle.mjs --sage-child-repeat-recovery: exit 0, verified true; two distinct recovery rounds.node scripts/probe-codex-lifecycle.mjs --sage-followup-recovery: exit 0, verified true; exact second brief, same child, two bindings and two completions. Recovery preserves the admission journal; the unit test separately preserves the earlier transcript evidence.node scripts/probe-codex-lifecycle.mjs --sage-report: exit 0, verified true; normal report completion still works.temporaryRootRemoved: true. Responses are simulated; the CLI is real. Tests use fake process tools first on PATH and unset inheritedNODE_TEST_CONTEXT. Native fixtures use the test machine-identity marker.npm test -- --test-concurrency=1:tests 1236,pass 1236,fail 0,cancelled 0,skipped 0. Exact-commit CI also passed all 1,236 tests, with zero failed or cancelled (run 38512769114).All eight new test groups fail on detached main
0cfb847through missing expected refusals. Their first failures are: ended-run tool use; ended run during evaluation; valid branch retarget after dispatch; ended-run recovery; changed review commit during recovery; held recovered completion; changed continuation candidate during recovery; changed review commit at completion. These prove those first assertions, not every later matrix case.Not verified: installed automatic Sage, real-model recovery, every runtime route or an upstream hook-failure fix. No installed configuration changes are part of this PR.