Repository navigation
Restore Codex child assignments after compaction (T25) - #166
Merged
Merged
Conversation
This was referenced Oct 13, 2026
erickb336
marked this pull request as ready for review
October 13, 2026 13:01
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 #165
Sage task T25
After native compaction, an assigned Codex child must restore its saved instructions before ordinary work or completion. The new no-argument
sage_read_assignmenttool returns only the authenticated child's current initial assignment. Every new compaction requires a new verified read. Recovery preserves capacity and remains subject to normal tool permission checks, including when Sage is off.The source changes live in
packages/sage-codex/runtime/; the build regenerates the bundled plugin. Claude's active state-tool and hook work is unchanged.Validation at
e2138a238fb3332a77b3b909e0e449601639bedf:npm run build: built 276 files.npm run check: all checks pass.npm test: 1,084 tests; 1,084 pass; 0 fail, cancelled, skipped, or todo. Exact-head CI run 38401199390 also passed all 1,084 tests, with zero failures, cancellations, or skips.6d07519. Some failures are missing APIs; behavior failures include main allowing child work before recovery and missing the asynchronous compaction check.node scripts/probe-codex-lifecycle.mjs --sage-child-repeat-recovery: CLI 0.160.0 completed two native compaction rounds using simulated model responses. Both rounds held tools and completion until the exact assignment arrived. The complete admission journal stayed unchanged during recovery. Report persistence and retry survived transcript removal. The probe removed its temporary profile.unrecovered_work_ran, showing the missing behavior.Every test and probe used fake
ps,pgrep, andkillfirst on PATH.Not verified: real-model consumption, a real-project pilot, later assignments, shared task/run integration, or installed automatic enforcement. Automatic Sage remains incomplete; see #88. The upstream hook failure remains open.