Repository navigation
Read current child delivery without a callback turn (T32) - #180
Merged
Merged
Conversation
This was referenced Oct 13, 2026
erickb336
marked this pull request as ready for review
October 13, 2026 15:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.e50fac4baeec45f1bb8ae67028bb9c41d6f26ca5.npm test: 1,123 tests, 1,123 pass, 0 fail, 0 cancelled, 0 skipped.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-callbackspasses on integration commitdaa9bbeusing 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.