Skip to content

Read current child delivery without a callback turn (T32) - #180

Merged
erickb336 merged 2 commits into
mainfrom
codex/t32-delivery-discovery
Oct 13, 2026
Merged

erickb336 merged 2 commits into
mainfrom
codex/t32-delivery-discovery

Conversation

@erickb336

@erickb336 erickb336 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Closes #179
Sage task T32

A missed follow-up callback leaves Sage without the child’s new turn ID. This component adds a read-only way to find the exact saved task in the current protected child transcript. It returns the native turn and message evidence, returns null when the task is absent, and refuses stale or ambiguous matches.

This is a prerequisite for later callback recovery in #88 and #138. It does not bind a child, accept a report, reserve capacity, or grant tool permission. The existing explicit-turn reader retains its behavior. Sources are the Codex identity reader, assignment tests, and identity documentation; plugin output comes from the build.

Validation at e50fac4baeec45f1bb8ae67028bb9c41d6f26ca5:

  • npm run build: built 278 files.
  • npm run check: all checks pass.
  • node --test packages/sage-codex/runtime/assignment-turn.test.mjs: 21 tests, 21 pass, 0 fail.
  • Code, security, and QA each passed two clean cycles on unchanged head e50fac4baeec45f1bb8ae67028bb9c41d6f26ca5.
  • npm test: 1,123 tests, 1,123 pass, 0 fail, 0 cancelled, 0 skipped.
  • Exact-head CI run 38419767915: success; 1,123 tests, 1,123 pass, 0 fail, 0 cancelled, 0 skipped.

Main comparison: copied only the changed test file into a detached worktree at eac1945. node --test --test-name-pattern='delivery discovery' packages/sage-codex/runtime/assignment-turn.test.mjs: 3 tests, 0 pass, 3 fail because the reader API is absent. This is missing-API evidence, not a demonstrated regression in an older implementation.

Integration evidence: node scripts/probe-codex-lifecycle.mjs --sage-followup-missed-callbacks passes on integration commit daa9bbe using the same reader implementation. Actual CLI 0.160.0 with simulated responses completes two assignments on one child without child tool calls or stored stop callbacks. The parent recovers delivery, keeps the first report, and removes the temporary profile. That integration has prerequisites outside this PR; this result does not establish an operational follow-up workflow on main.

Not verified: real-model recovery, installed automatic Sage, or complete policy composition. Installed automatic Sage remains disabled. Every test and probe uses fake ps, pgrep, and kill first on PATH. The native integration probe exited and removed its temporary profile; all owned local validation processes finished.

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

Recover current child delivery evidence without a callback turn (T32)

1 participant