Feature Request: Execution Replay / Debug Replay Mode
What variant of Codex are you using?
CLI
What feature would you like to see?
Feature Request: Execution Replay / Debug Replay Mode
Summary
Codex already provides:
- session rollout persistence
- event streaming
- sandboxed execution
- autonomous "exec" mode
- tool orchestration
However, there does not currently appear to be a structured way to replay or inspect a previous execution flow for debugging and reproducibility purposes.
A replay/debug mode could significantly improve investigation of:
- flaky autonomous runs
- sandbox-related failures
- unexpected tool behavior
- approval flow debugging
- session restoration issues
- CI/non-interactive execution diagnostics
---
Proposed UX
Examples:
codex exec --record "fix failing tests"
codex replay SESSION_ID
codex replay rollout.jsonl
Possible capabilities:
- replay event streams
- inspect tool calls in order
- inspect command outputs
- inspect approvals/denials
- compare generated diffs
- inspect failure points
- optionally re-run tools in dry-run mode
---
Why this could be valuable
Codex already has strong runtime foundations:
- session persistence
- event-driven architecture
- sandbox policies
- autonomous execution ("exec")
- MCP interoperability
Replay/debug tooling feels like a natural extension of the existing runtime model and could improve:
- reproducibility
- debugging workflows
- CI diagnostics
- trust/inspection of autonomous execution
- developer ergonomics for long-running tasks
---
Additional thoughts
Even a lightweight first version focused purely on event/timeline inspection (without deterministic model replay) would already be extremely useful.
For example:
codex replay --inspect SESSION_ID
to inspect:
- event order
- tool execution timeline
- command outputs
- approval decisions
- generated patches
- failure boundaries
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗