Repository navigation
fix(roadmap): keep tool events in the trace of a long run - #4436
Conversation
The step added the model events of a turn after the turn, and the bound of the trace dropped the oldest events first, so a long run lost all its tool and check events. A model event now stands where its reply came, and the bound drops the oldest model events before any other event. A shell call holds its exit status. Part of #4393.
🤖 I have created a release *beep* *boop* --- ## [0.109.1](v0.109.0...v0.109.1) (2026-11-11) ### Bug Fixes * **roadmap:** keep tool events in the trace of a long run ([#4436](#4436)) ([50839d7](50839d7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Test results and measure (#4393)This comment records the evidence of the change. The owner merged it at 2026-11-11 00:31 UTC, before the work posted this comment. Fail-to-pass
Full local CI
Before and after: a synthetic long runThe script makes the events of a run with
The base result is the same as the failure in the issue: Gap after the mergeThe acceptance criterion "Render tool and check details" of #4393 also asks that |
|
Review of this pull request after the merge. The pull request is merged, so no commit goes to its branch. Each finding is filed as an issue.
The task gave no minor findings. No code changed, so no |
The trace of an implement run holds the digest of the argument of each tool call, but devops roadmap explain --trace did not show it. So a reader could not see that the model made the same call two or more times. Issue #4393 asked for this, and #4436 left it out. Now the line of a tool event shows the digest after the program, as in `group 1: tool shell (program git) [argument abc123abc123], ok (exit status 0)`. A tool event with no digest shows no argument part, so an older trace still prints. The digest is 12 hexadecimal characters of the SHA-256 of the masked argument, so the line holds no argument and no secret. Closes #4444 Change: `openspec/changes/archive/2026-11-11-4444-explain-trace-shows-the-argument-digest/`
devops roadmap explain and explain --json reported 0 tokens and 0 seconds for a long implement run. Since #4436, the bound of the trace drops the oldest model events first, and trace_totals summed only the kept events. Now the encoded trace keeps the sums of the events that the bound drops: dropped_tokens and dropped_seconds for model events, and dropped_repair_rounds and dropped_outcomes for attempt events. decode reads them, a trace with no sum decodes with sums of zero, and trace_totals adds them. One class, TraceSums, makes the sums of the kept and of the dropped events. The sums count toward the bound, and a sum of zero is not written. The line beside the totals says that the totals include the dropped events when the trace holds their sums. For a trace with no dropped sum, such as one from before this change, the line says that the totals leave them out. Closes #4457 Change: `openspec/changes/archive/2026-11-11-4457-explain-totals-count-dropped-model-events/`
The trace of a long implement run kept only model events, so a reader could not see the tool calls and the checks of a run that stopped. The step added the model events of a turn after the turn, and the bound dropped the oldest events first. Now the step adds a model event when its reply comes, so the events stand in the order of the run. When the trace does not fit CONST_ROADMAP_IMPLEMENT_TRACE_CHARS, it drops the oldest model events first and only then the oldest other events. The tool, check, retry and attempt events show what the run did, and implement.spend keeps the tokens of the run. A shell call holds the exit status of its command, and explain --trace shows it. An event holds no argument, no output and no secret.
Closes #4393
Change:
openspec/changes/archive/2026-11-10-4393-keep-tool-events-in-the-trace/