Repository navigation
Description
Missing behavior
Codex admission can record exact terminal evidence after #158, but the merged runtime does not yet connect native child completion to that journal transition. A stop callback alone is not proof that a child stopped: another hook can refuse the stop and let it continue.
Sage task T22. This is the next provider lifecycle component for #88 and #138.
Scope
Connect native stop observations and parent list/wait reconciliation to exact initial-assignment terminal evidence. Keep reservations until a protected native transcript proves completion or interruption. Keep completion distinct from report intake, task success, and verdict acceptance. Include bounded report-field correction at the stop boundary, matching Claude's behavior.
Reuse verified child identity, task hash, native turn, and transcript-path checks. Initial no-tool children use the child transcript supplied by the authenticated stop callback. Missing results or missing transcript references retain capacity. Duplicate and late callbacks cannot release another assignment. Ordinary unassigned children while Sage is off must not acquire a Sage reservation.
Edit only Codex adapter sources and shared report-field helpers needed by this boundary, with their tests and generated output. Do not edit Claude's active hook or shared state-tool work. Later assignments and full compaction/current-run integration remain part of #138; unsupported evidence must refuse, not infer success.
Acceptance
- A blocked stop retains the slot until actual terminal evidence appears.
- Parent reconciliation verifies only its own children and does not trust a tool result's status label.
- Completed and interrupted outcomes remain distinct and idempotent.
- No-tool completion validates the exact saved assignment and child path.
- Changed, missing, stale, foreign or ambiguous evidence retains the slot.
- Sage off preserves pending work and permits exact completion without changing mode.
- One report-field correction is requested; a native retry does not bypass identity checks or accept the report.
- Tests cover isolated packaged MCP calls and fail on detached main.
- A native temporary-profile probe checks the actual callback/terminal ordering with simulated responses; its report states what real-model behavior remains unverified.
- Build, check, full tests and two clean code/security/QA review cycles pass before merge.
Limits
This component does not grant installed automatic activation. The required-hook failure and #94 remain activation blockers. Automatic Sage remains incomplete; see #88.
Activity