Skip to content

Verify active-child Codex process restart behavior (T4) - #247

Merged
erickb336 merged 2 commits into
mainfrom
codex/t4-active-child-restart
Oct 15, 2026
Merged

erickb336 merged 2 commits into
mainfrom
codex/t4-active-child-restart

Conversation

@erickb336

@erickb336 erickb336 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Closes #245

Sage task T4

Result

Adds an observational CLI 0.160.0 probe for an active child's state across owner process restart. It changes no production policy or installed activation defaults.

Exact candidate: 02d306608da424ef6611965fb09426fa70e8a419.

With fixed simulated model responses and a directly tracked native executable:

  • Clean EOF writes an exact child interruption before resume. Parent reconciliation records one interrupted completion and releases capacity.
  • Native SIGKILL leaves no terminal child record. Resume shows only the root; reconciliation retains capacity.
  • Optional recorded-child loading adds a settings event and displays the old turn as interrupted. The registry shows the child as pending_init. No child model request resumes, and no terminal receipt releases capacity.

The load route supplies no child input, starts no child turn, and sends no follow-up. Displayed status is not terminal evidence. These are bounded observations, not proof that recovery is impossible indefinitely or that automatic child restoration works.

The original launcher-loss captures remain explicitly separate. Killing an npm launcher does not prove native SIGKILL. Current runs validate the native executable format and exact version before spawning that path directly.

Validation

  • npm run build: 306 generated files; npm run check passes.
  • Focused: 16 helper tests pass: 11 original helpers, two capture/cleanup regressions, and three child-load/request-outcome tests.
  • Exact-head native: all three commands below exit 0 with complete bounded captures and successful cleanup:
    • node scripts/probe-codex-active-child-restart.mjs --clean-eof
    • node scripts/probe-codex-active-child-restart.mjs --abrupt-loss
    • node scripts/probe-codex-active-child-restart.mjs --abrupt-loss --load-child
  • npm test -- --test-concurrency=1: 1,408 passed, zero failed, skipped, or cancelled; exit 0 on this exact head. The earlier 1,403-pass result belongs to predecessor 68afedd.
  • Two independent CODE, security, and QA review cycles are clean.
  • Exact-head CI run 38804728837 passed: 1,408 tests, 1,408 passed, zero failures, cancellations, or skips. The final job log was inspected.

Baseline proof is limited: all six final helper test files copied to detached main bdd7aa2 produce six file-level failures because their modules are absent. These are not 16 behavioral failures. This proves absent harness APIs, not a repaired production behavior. The new child-load tests cover new observational APIs, so no historical runtime regression is claimed.

The incomplete-capture test fails against the pre-repair cleanup helper. An isolated FIFO-open observer passes on this candidate and fails when the pre-open regular-file guard is removed; it intercepts the open and cannot hang on a FIFO. The earlier EOF mutant fails when EOF alone is treated as terminal. These controls are separate from full-suite results.

Reproduce the focused checks:

node --test --test-name-pattern='restart |EOF is not exit|abrupt loss signals|RPC close rejects' scripts/codex-server.test.mjs

Native commands and isolation requirements are in docs/verification/codex-active-child-restart.md. Raw captures remain local. No real-model judgment, installed-session adoption, or cross-session authority transfer is verified.

@erickb336
erickb336 marked this pull request as ready for review October 15, 2026 20:58
@erickb336
erickb336 merged commit 654bc8c into main Oct 15, 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.

Verify active-child recovery across Codex process restart (T4)

1 participant