Skip to content

Keep Codex child work and recovery on current targets (T55) - #222

Merged
erickb336 merged 1 commit into
mainfrom
codex/t55-current-child-targets
Oct 14, 2026
Merged

erickb336 merged 1 commit into
mainfrom
codex/t55-current-child-targets

Conversation

@erickb336

@erickb336 erickb336 commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

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:

  • Two clean independent code/security/QA cycles.
  • npm run build: built 294 files.
  • npm run check: all checks pass.
  • Focused node --test run: 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.
  • Every native probe reports temporaryRootRemoved: true. Responses are simulated; the CLI is real. Tests use fake process tools first on PATH and unset inherited NODE_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 0cfb847 through 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.

@erickb336
erickb336 marked this pull request as ready for review October 14, 2026 04:47
@erickb336
erickb336 merged commit 47146fe into main Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep Codex child work and recovery on current targets (T55)

1 participant