[rollout_trace] Record core session rollout traces#18877
[rollout_trace] Record core session rollout traces#18877cassirer-openai merged 6 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/session/handlers.rs
Lines 969 to 973 in 3844251
Session shutdown sends ShutdownComplete but never calls rollout_trace.record_thread_ended(...). As a result, traces never emit ThreadEnded/RolloutEnded, leaving rollout status stuck in running and dropping the session lifecycle boundary this change is meant to capture.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3844251 to
582bf74
Compare
f1f33a0 to
098ccc9
Compare
|
[codex] The review note about emitting |
098ccc9 to
15310f1
Compare
## Summary Adds the standalone `codex-rollout-trace` crate, which defines the raw trace event format, replay/reduction model, writer, and reducer logic for reconstructing model-visible conversation/runtime state from recorded rollout data. The crate-level design is documented in [`codex-rs/rollout-trace/README.md`](https://github.com/openai/codex/blob/codex/rollout-trace-crate/codex-rs/rollout-trace/README.md). ## Stack This is PR 1/5 in the rollout trace stack. - [#18876](#18876): Add rollout trace crate - [#18877](#18877): Record core session rollout traces - [#18878](#18878): Trace tool and code-mode boundaries - [#18879](#18879): Trace sessions and multi-agent edges - [#18880](#18880): Add debug trace reduction command ## Review Notes This PR intentionally does not wire tracing into live Codex execution. It establishes the data model and reducer contract first, with crate-local tests covering conversation reconstruction, compaction boundaries, tool/session edges, and code-cell lifecycle reduction. Later PRs emit into this model. The README is the best entry point for reviewing the intended trace format and reduction semantics before diving into the reducer modules.
582bf74 to
899bb99
Compare
Summary
Wires rollout trace recording into
codex-coresession and turn execution. This records the core model request/response, compaction, and session lifecycle boundaries needed for replay without yet tracing every nested runtime/tool boundary.Stack
This is PR 2/5 in the rollout trace stack.
Review Notes
This layer is the first live integration point. The important review question is whether trace recording is isolated from normal session behavior: trace failures should not become user-visible execution failures, and recording should preserve the existing turn/session lifecycle semantics.
The PR depends on the reducer/data model from the first stack entry and only introduces the core recorder surface that later PRs use for richer runtime and relationship events.