Skip to content

Reserve prepared continuations on completed children (T33) - #182

Merged
erickb336 merged 1 commit into
mainfrom
codex/t33-prepared-continuations
Oct 13, 2026
Merged

erickb336 merged 1 commit into
mainfrom
codex/t33-prepared-continuations

Conversation

@erickb336

@erickb336 erickb336 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Closes #181
Sage task T33

A completed child can now take a separately prepared run without reusing its old completion receipt. Core saves an immutable run target, reserves capacity again, and binds the new assignment to the same child in a new turn. An old stop cannot release the new reservation.

A continuation requires the same project, session, owner epoch, task and role, plus a completed predecessor, new run and saved task-message hash. Concurrent requests cannot fork its history. A resumed lead retains its own team, while every slot and child limit still applies. Initial-spawn failure evidence cannot release a continuation.

prepareAdmission accepts named options for runTarget and continuation; existing initial calls remain valid. Core checks the snapshot, but the adapter must verify current logbook truth and native dispatch/delivery before granting permission. This PR does not wire native follow-up dispatch or change Claude hooks or the shared state tool.

Sources: core admission, run-target parsing, ownership policy, exports and documentation. Both generated provider bundles come from the build. This is a component of #88 and #138.

Validation on f5743a5f67405f2c5e6842aa8af2a5b6a90cc16a:

  • npm run build: built 280 files.
  • npm run check: all checks pass.
  • node --test --test-name-pattern='prepared run target|continuation' scripts/providers.test.mjs: 10 tests, 10 pass, 0 fail.
  • npm test: 1,133 tests, 1,133 pass, 0 fail, 0 skipped.
  • Exact-head CI run 38422316644: check passed; 1,133 tests, 1,133 pass, 0 fail.
  • Code, security, and QA each passed two clean cycles on unchanged final head f5743a5f67405f2c5e6842aa8af2a5b6a90cc16a.

Baseline proof: copied only the new provider tests into a detached worktree at main 28b5c3c. The same focused command reports 10 tests, 0 pass, 10 fail. Two target tests and the options test fail because main ignores these fields. Seven continuation tests fail because the new APIs are absent. These API failures do not establish behavior of an older implementation.

Not verified: native follow-up wiring on main, real-model behavior, installed automatic Sage, or complete policy composition. Existing initial dispatch behavior remains covered by the full suite. The broader integration has native continuation evidence, but it includes prerequisites outside this PR. Installed automatic Sage remains disabled.

Every test uses fake ps, pgrep and kill first on PATH. Concurrent test workers close before the test returns. No attack strings run in a real shell. All local test workers have finished. Exact-head CI passed.

@erickb336
erickb336 marked this pull request as ready for review October 13, 2026 15:36
@erickb336
erickb336 merged commit a0f6674 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.

Reserve and bind prepared follow-up assignments on completed children (T33)

1 participant