Repository navigation
Description
Sage task T27
Parent: #88
Problem
The current shared state tool requires --tokens with a whole-number usage value when a code/security/UX/QA run finishes as done. The Codex collaboration interface available to the manual Sage workflow exposes agent names and terminal status, but no authoritative per-run token count. A completed code review or QA therefore cannot follow the normal done-record path without inventing a metric.
Observed on the final #275 review: independent code and QA reports completed CLEAN/PASS, all owned processes terminated, but run completion refused without --tokens. Their records are explicitly blocked on bookkeeping with token usage unavailable; no count or successful completion record was fabricated, and no merge/readiness claim follows.
Investigation before implementation
Compare a supported authoritative host-usage receipt with an explicit unknown-usage representation. Define what statistics and readiness mean for each case before changing the shared contract. Do not estimate from output length, context capacity, global goal deltas or unrelated diagnostic subprocess counts. Unknown is not zero.
- Verify whether a supported native source exposes usage for the exact assigned review run. Bind its identity and prevent another run's count from being substituted.
- If no such source exists, propose a truthful unknown representation and show how totals disclose missing observations. Do not silently erase a requirement or forge a done record.
- Keep substantive review evidence separate from metrics availability. Preserve permissions, ownership, task-state checks and native report authority.
- Coordinate shared state changes with Claude-active work; do not overlap PR Programs: a programs table, the program column, program propose and the implicit waits (T337) #282.
- Add direct regression and failure controls for the selected design, then required checks and independent review.
No implementation or default change is part of this issue creation. This is a Codex capability gap exposed by the newly merged review-data requirement, not a claim that a review failed or that measured usage is zero.
Activity
erickb336 commentedon Oct 20, 2026
Capability check on Codex CLI 0.160.0:
ThreadTokenUsageUpdatedNotificationrequiresthreadId,turnId, andtokenUsage, with last and total token breakdowns.ThreadReadResponseandThreadResumeResponseschemas contain notokenUsagefield. This is a bounded schema observation, not proof that every host interface lacks usage.A future adapter could collect usage events prospectively, but it must bind the real native thread and turns to the exact Sage assignment. A thread lifetime total cannot stand in for one assignment, especially after follow-ups.
Recommendation for the design review: represent unavailable usage explicitly, with a reason and source. Exclude unknown values from numeric sums and display the number of unmeasured runs beside totals. Preserve substantive review, report authority, ownership and task-state requirements. Unknown must never become zero.
No implementation, default, run verdict or merge-readiness change was made. Shared-state implementation remains subject to coordination with Claude-active PR #282. A controller-owned collector belongs in the deferred autopilot design.
The schema generator and parser exited normally. No background tasks or model requests were started.
erickb336 commentedon Oct 20, 2026
Owner decision: permit explicit unavailable usage only as a narrow exception for providers or execution interfaces that do not expose authoritative per-run usage.
This is not a general opt-out. Interfaces that expose counts must supply them. A retrieval failure must not be reclassified as an unsupported capability. Bind any exception to the actual provider/interface and reason; do not assume that all Codex interfaces have the same capabilities.
Keep unknown distinct from zero, disclose incomplete totals, and preserve review, report, ownership and task-state requirements. Existing terminal blocked runs remain unchanged. No runtime implementation changed; shared-state edits still wait for Claude-active PR #282 ownership clearance.
erickb336 commentedon Oct 20, 2026
Implementation is framed as Sage task T28, following investigation T27. PR #282 merged, releasing the shared-state overlap. Active Claude PR #288 board/README paths are excluded.
The owner answered G5: allow an evidence-backed chief declaration of the execution interface in the manual workflow, explicitly labelled unauthenticated. This is not a host-authentication guarantee.
Selected contract: immutable per-run interface binding from a fixed provider-injected capability list. Only a known unsupported interface may record unavailable usage with evidence. Supported interfaces still require counts; retrieval failures and unknown interfaces cannot use the exception. Keep numeric cells numeric or empty, disclose partial totals and legacy missing observations, and preserve terminal history, report authority and review/task-state protections.
Lead R152 and implementer R153 are registered. Implementation, baseline failure proofs and independent review are pending. No third Codex PR will open while #278 and #279 remain open. No merge-readiness or installed automatic Sage claim follows.
erickb336 commentedon Oct 20, 2026
T28 implementation is pushed on
codex/t28-unavailable-review-usageat491945ca044f0ea1a5d5107979616525272f8241.The approved narrow exception uses a fixed provider-injected capability list and immutable, explicitly unauthenticated chief-declared interface metadata. Supported/default/unknown interfaces cannot opt out. Unavailable counts remain empty; partial totals disclose missing observations. Audited enrichment preserves terminal history and exact retries.
Two actual independent clean code-review and QA cycles completed on this exact commit: R156/R157 and R158/R159. The initial candidate had two findings (recovery column loss and missing per-task measured totals); both were repaired and independently verified. Focused usage tests: 11/11. Build: 324 files. Check: pass.
The earlier full suite passed 1894/1894 on rejected predecessor
cee974e; that does not certify this repaired commit. The final-head full suite is still running, so no checks-pass/readiness or merge claim follows. The temporary repair checkout is removed; the commit is retained on the task branch.No new PR is open while #278 and #279 remain open. The current installed CLI still cannot record these legacy-created review runs done without unavailable metrics; their bookkeeping is explicitly blocked, while the exact substantive reports/verdicts remain preserved. No counts or native receipts were fabricated. One old reviewer command lost its execution handle; cleanup remains unconfirmed and is not cleared by later successful runs.
No installed automatic Sage, authenticated host binding or real host token-collection claim follows. Claude-active board paths remain untouched.