Skip to content

Restore initial Codex child assignments after compaction (T25) #165

Closed

Description

@erickb336

Current status

PR #166 is ready for review at e2138a238fb3332a77b3b909e0e449601639bedf, based on main 6d07519.

  • Build and repository checks pass.
  • Ten new recovery tests pass locally and fail on detached main. Some failures reflect missing APIs; others show main permits unrecovered tool work.
  • The actual CLI 0.160.0 probe passes two compaction rounds with simulated model responses. Each round requires fresh exact assignment recovery. The complete admission journal stays unchanged during recovery. Receipt recovery, retry, and temporary-profile cleanup pass.
  • Two clean code/security/QA cycles passed on the unchanged final commit.
  • All 1,084 final-head local tests pass. CI is running; merge waits for its result.

Missing behavior

Sage task T25. The merged Codex runtime can inspect and preserve an initial child report, but it cannot restore the child's saved assignment after native compaction. It currently holds completion after compaction rather than accepting unverified recovery.

This component advances #138 and #88. Use the prepared recovery design from the Codex integration branch.

Scope

Expose sage_read_assignment with no caller-supplied selector. The authenticated child receives its own current, active, delivered initial assignment, including the exact saved role, brief, task, run, and message hash.

Connect the existing native recovery reader to tool and stop handling. After each compaction, ordinary child work waits until the protected transcript proves that the matching assignment-read result reached the child intact. A read grants no permission by itself. Recheck assignment identity and terminal state after asynchronous evaluation. Sage off still permits recovery of preserved assigned work without enabling new dispatch.

Acceptance

  • Only the assigned native child reads its current assignment. Unknown, parent, foreign, stale, completed, interrupted, malformed, or ambiguous requests fail.
  • The returned message exactly matches the prepared task hash and native delivery.
  • Every compaction invalidates prior recovery evidence. Truncated, forged, stale, wrong-turn, or unmatched tool output cannot restore work or completion.
  • The required assignment read remains available during recovery, including Sage off; unrelated child work remains held until valid recovery evidence exists.
  • Recovery neither releases capacity nor accepts report claims. Native terminal evidence still controls completion.
  • Preserve existing report inspection, durable receipts, and sibling-isolation rules.
  • Add packaged tests and native simulated probes, including repeated compaction. Prove new tests fail on detached main.
  • Build, check, full tests, and two clean code/security/QA cycles pass on the final commit.

Boundaries

Initial assignments only in this extraction. Later assignments and shared task/run integration remain subsequent components. Do not edit Claude's active state-tool or hook work in #140. Installed activation still requires the outstanding hook and SDK blockers plus a real-project pilot.

Activity

  1. added
    codex
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions