Skip to content

Bind initial Codex children from native task delivery (T20) - #156

Merged
erickb336 merged 2 commits into
mainfrom
codex/t20-child-delivery
Oct 13, 2026
Merged

erickb336 merged 2 commits into
mainfrom
codex/t20-child-delivery

Conversation

@erickb336

@erickb336 erickb336 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Closes #155
Sage task T20

A prepared Codex child can bind its initial assignment through its first tool, even when no MCP SubagentStart callback arrives. The composed policy checks native identity, the exact prepared task hash, the parent dispatch result and the current unfinished turn before it calls the supplied evaluator. A turn that ends during an awaited evaluator is refused before permission returns.

Missing evidence retains capacity. Validated initial delivery is saved without granting permission while a parent result is missing. A later retry creates one binding. Transcript paths remain inside the configured native session directory and cannot use symbolic links.

Sources change only in packages/sage-codex/runtime/, plus packaged tests. Generated plugin files come from the build. Claude hooks and the shared state tool do not change.

Validation uses fake ps, pgrep and kill first on PATH:

Command Result
npm run build built 267 files
npm run check all checks pass
node --test scripts/codex-server.test.mjs before the final positive-control addition tests 53; pass 53; fail 0
npm test at 50d89d0 (same executable code as final head) tests 1024; pass 1024; fail 0; cancelled 0; skipped 0
Final-head six focused delivery checks tests 6; pass 6; fail 0
Detached main, six new tests tests 6; pass 0; fail 6

The six new tests fail on detached main eac3614 with only the updated test file copied. Main refuses the new transcript-path input before delivery checks; the packaged MCP test receives a refusal instead of binding. This proves missing functionality, not each later refusal rule on its own. On this branch the positive controls reach the intended policy and identity checks.

The existing nested-child fixture now supplies an actual synthetic child transcript and its own turn. Its observation count changes from six to seven because the policy records the child's verified transcript. Its other assertions remain unchanged.

Not verified here: actual native CLI delivery on this extraction, real-model behavior, installed automatic Sage, later assignments, report acceptance, capacity release, current logbook targets or compaction recovery. The MCP checks use real local server connections with synthetic native payloads. Automatic Sage remains incomplete; see #88.

Two code, security and QA review cycles are clean at final head c5df3b04ed99b20f4de7999096fc436b9783c96b. The final six focused checks pass. The only change since 50d89d0 removes a trailing blank line from source and generated output. The local full suite passes. Final-head CI run 38386385018 passes all 1,024 tests: 0 fail, 0 cancelled, 0 skipped. All owned local test and native-probe processes have exited; the reviewers started no background tasks.

@erickb336
erickb336 marked this pull request as ready for review October 13, 2026 11:01
@erickb336
erickb336 merged commit 5d1345b into main Oct 13, 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.

Bind initial Codex children from native task delivery (T20)

1 participant