0233: Status-box evidence and turn continuity
Status: accepted (2026-11-04) · Scope: product tier (core/agents, hooks, V3 producer)
Context
Section titled “Context”A transcript-wide substring search could accept an earlier reply’s status box. Quoting the opening marker also satisfied the check. The formatter counted UTF-16 units as display columns and let embedded newlines escape the box.
Recovered Claude turns had another mismatch: the Stop rule recognized them through provenance, while elapsed time and edit counts followed a different flag. A turn that took 615 seconds could report only its final 10 seconds.
Finally, a successful guarded status observation remained valid after later tools changed an owned file. The status command checked Git when it ran, but the Stop rule did not recheck the final state.
Decision
Section titled “Decision”The box renderer normalizes control characters and frames each visual row. An internal display-width helper wraps on grapheme boundaries. Stored tasks and external labels are normalized to single lines. The existing compact layout stays in place.
A supplied completed reply is authoritative, including an empty reply. Transcript fallback reads assistant text since the latest genuine operator prompt. Tool results, hook feedback, compaction summaries, and task notifications do not start a new operator turn. When the prompt precedes the tail window, the remaining window is still usable evidence. The detector requires a complete fenced top, content, and bottom structure; padding and display width do not affect the verdict. Reply bodies remain outside the canonical ledger.
Recovered turn.started events carry continues_turn_id. The producer links
repeated retries to the preceding logical turn even when the adapter reuses
the original native prompt ID. The producer keeps a bounded map of closed
turns and their native origins, so an interleaved old completion cannot
replace the latest retry of another prompt. One
resolver supplies the boundaries
for Stop, elapsed time, and recorded edits. It follows only adjacent logical
starts in the same generation, after excluding orphan recoveries. A late
signal for a closed turn is diagnosed and ignored while an unrelated prompt
is open, rather than attributed to that prompt.
The producer retains the latest genuine operator prompt separately from recovery turns. If an older recovery is still open when that prompt resumes, the producer closes the orphan and opens a linked continuation for the current prompt. This also covers a continuation that ends without using a tool. A genuine open operator turn is never displaced by a late signal.
When the host requires Git finalization, Stop rechecks the same current and historical owned paths used by the status command. The supplemental check skips repository-wide upstream and submodule freshness; the status command continues to enforce those checks unchanged. The evaluator receives one of three outcomes:
- Observed clean work passes the supplemental condition.
- Observed dirty or unpushed work, incomplete history, unsupported paths, or unverifiable Git state blocks completion.
- An observer that cannot run produces an unavailable result in debug output. Only the supplemental condition is skipped; existing status, box, task, and naming rules still run.
The Git subprocess budget is two seconds for the supplemental check. Codex remains observe-only, and existing workflow and background-handoff exemptions remain in force.
Alternatives considered
Section titled “Alternatives considered”An exact box receipt, identity match, or equal-width requirement would add false blocks when names or copied padding change. Line structure addresses the detector defect without those requirements.
Event ordering alone cannot distinguish a harmless later read from an edit. It also misses multiple commands inside one shell call. A fresh owned-path check tests the final Git state directly and preserves the pure evaluator’s request-based interface.
Marking every recovery as remediation would merge unrelated late events. Keeping three different range resolvers would preserve the original timing and edit-count disagreement. Explicit continuity links replace both patterns.
Result and limits
Section titled “Result and limits”Regression tests cover current-reply evidence, native synthetic transcript rows, control characters, Unicode widths, repeated retries, late recoveries, and owned-file changes after a closing check. Git observation failures cannot erase claim history already known to be incomplete.
The supplemental check proves the state of known owned paths when Stop runs. It cannot prove that an unclaimed path is clean or that a background process will not write after the check.
This refines the evidence model in ADR 0081 and preserves ADR 0226’s background handoff policy.