Repository navigation
Description
Decision needed
Raised by the Spec review of #1046 while implementing #983 for #700.
#983 requires every model call's start/end and reported usage from Claude, Grok and Codex. Codex's exec --json stream supplies whole-turn boundaries and aggregate usage, with no individual model-request boundaries or observed Model records. A turn may include multiple requests. The decoder can faithfully normalize turns, tool calls, messages, errors and sub-agents, but cannot recover missing per-request facts from that stream.
Evidence
- The upstream exec event schema defines
turn.started,turn.completedwith aggregateUsage,turn.failed, items and errors; no model-request lifecycle or Model is present. - The PR's event contract deliberately keeps
TurnStarted/TurnEndeddistinct fromModelCallStarted/ModelCallEnded. - The exact review command
cargo test --bin thirdshift harness::interpretation::event_tests::review_codex_fixture_contains_model_call_lifecycles -- --exactran one test and failed: the fixture's successful turn reports 100 input / 7 output / 20 cached tokens, with zero model-call starts. The regression remains in the PR, explicitly ignored pending this decision. Use-- --exact --ignoredto run it in that state.
Why this call belongs to the Day shift
Meeting the literal criterion requires an additional source of Codex evidence (for example retained rollout records or a different transport), or an explicit #700/#983 exception accepting turn aggregates where per-request evidence is unavailable. Choosing that source/transport or changing the Spec's granularity changes the trace contract and later Tickets; fabricating one model call per turn would give false measurements. The decoder implementation should not silently make that decision.
Choose the evidence source and its scope, or amend the Spec to state the accepted Codex limitation. This issue has only needs-triage and creates no blocking edge.
Activity
JacobStephens2 commentedon Oct 25, 2026
Triage Notes
What we've established so far:
rollout-*files elsewhere.What we still need from you (@JacobStephens2):
JacobStephens2 commentedon Oct 30, 2026
New evidence for the rollout question: #1651. On a real Codex Ticket run, the
exec --jsonstream gave thirdshift neither the observed Model (every session recordedmodel: null) nor the tokens of the session's own native sub-agents. The parent'simplementtotals under-count input by about 38% and output by about 80%. Both facts are in the session'srollout-*.jsonlfiles:turn_context.model, and per-threadtotal_token_usagewithparent_thread_id. That makes reading rollouts more than a question of per-request detail.JacobStephens2 commentedon Nov 10, 2026
Investigation of #1651 against Base ecaf0d4 confirms the accounting and Model gaps remain. Codex already has narrow native-rollout readers for patch reconciliation (src/harness/codex/patches.rs) and quota observations (src/harness/codex/limits.rs), but neither supplies observed Models or child usage. Consider deciding whether Model/native-usage enrichment can proceed independently of per-request lifecycle reconstruction. The existing normalized usage contract keeps aggregate turns separate from model calls; enrichment need not invent request boundaries. Recommendation for #1651 is ready-for-human pending this scope decision and a proposed split into Model attribution and native descendant accounting.