Resume hides prior tool calls in the TUI transcript

Resolved 💬 1 comment Opened Oct 5, 2025 by kdhira Closed Jan 10, 2026

What version of Codex is running?

codex-cli 0.44.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

  1. Launch a new session from a project directory with codex -a on-request.
  2. Ask the agent to run a simple shell command (e.g. “List the repo root with ls. ”) and approve the resulting exec request. Verify the transcript shows the tool call and command output.
  3. Exit the TUI (Ctrl+C or /quit).
  4. Resume the session with codex resume --last.
  5. Inspect the rebuilt transcript: only user/assistant text is replayed.

What is the expected behavior?

The resumed transcript should include the same tool-call history (exec, apply_patch, MCP, etc.) that was visible before quitting so operators can audit what already ran.

What do you see instead?

Only EventMsg content is replayed, so tool calls and their outputs disappear from the TUI after resume. The operator loses all visible evidence of previous automation even though the backend kept the context.

Additional information

  • SessionConfiguredEvent.initial_messages is built from InitialHistory::get_event_msgs, which filters out RolloutItem::ResponseItem entries, so function/exec records never reach the TUI on resume.
  • Relevant code: codex-rs/core/src/codex.rs:514, codex-rs/protocol/src/protocol.rs:896, codex-rs/tui/src/chatwidget.rs:1343.
  • Rationale: without those entries the operator can’t audit prior automation, increasing the risk of duplicate or unsafe approvals because they no longer know what already ran.
  • Concern: security reviews or incident response become harder—the persisted rollout has the data, but resumptions hide it from the human in the loop who must make approval decisions.

(Code references with rust-v0.44.0 tag checked out)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗