How do I see what commands Claude Code, Codex or Cursor ran?
Each agent keeps its own record of the commands it ran. In Claude Code, press Ctrl+O for the
transcript viewer, which shows each tool call in detail, or /export the session. In
Codex, commands appear in the chat as they run, and /export session.md saves the
conversation. In Cursor, the agent runs commands in your terminal, and your Run Mode decides which
ones it asks about first. Git shows what those commands changed in files, not what they did
anywhere else.
BuildGist is a Mac app for Claude Code, Cursor and Codex. Download for Mac.
Why the diff is not enough
git diff shows file changes. A command can do things no diff records: install a
package globally, delete a file Git was ignoring, call an API, run a database migration, or push a
branch. For those you need the command list.
Claude Code
- Ctrl+O toggles the transcript viewer. Anthropic's documentation says it shows detailed tool usage and execution, with a timestamp on each assistant message.
/exportsaves the conversation as plain text:/export session.txt.- The session file. Claude Code writes each message, tool use and result to a
JSONL file under
~/.claude/projects/. Search it for the shell tool calls when you need an exact command from an earlier session. Where the files are, and how long they are kept, is in Claude Code session history.
Claude Code's checkpoints do not track changes made by shell commands, so rewinding will not undo what a command did. Check the list before you rely on a rewind.
Codex
Codex shows commands and diffs in the chat as they happen. To keep a copy, wait for the turn to
end and type /export session.md; Codex writes the conversation to Markdown. Reopen an
older chat with codex resume. Where Codex keeps its state is in
Codex session history location.
Cursor
Cursor's agent runs shell commands in your terminal. Its Run Mode controls when commands run on their own, when Cursor asks first, and when they run in its sandbox. Scroll the chat to see each command and its output. If you want to approve each command, choose a Run Mode that asks.
A checklist after a run
- Scan the command list for anything outside the project: installs, deletes, network calls, pushes.
- Run
git statusto catch new files, including ones a command generated. - Run the tests yourself. A command that printed "passed" in the chat is not the same as a passing test now.
- If something was installed, check your lockfile in the diff.
Make commands easier to audit next time
- Use the agent's stricter approval setting for unfamiliar work, so each command is shown before it runs.
- Ask the agent to end each task with a list of the commands it ran and why. Treat the answer as the agent's account and compare it with the transcript.
- Give risky work its own branch or git worktree.
What BuildGist records, and what it does not
BuildGist explains each meaningful run of Claude Code, Cursor or Codex in plain English. It records the request you typed, the files changed with line counts, and the tests that ran with their result. It does not keep a log of every shell command; for that, use the agent's transcript above. Small changes stay quiet, so the Inbox is where the runs that matter show up. The explanation is written by AI, so check it against the code and the tests. How to read a run's changes in order of risk is in how to review AI code before merging.
Questions
Where can I see the commands Claude Code ran?
Press Ctrl+O for the transcript viewer, or type /export to save the session. Every tool call is also in the session's JSONL file under ~/.claude/projects/.
Does git diff show what commands an agent ran?
No. It shows file changes only. Installs, network calls, pushes and changes to ignored files do not appear.
Does BuildGist log every command an agent runs?
No. It records the request, the files changed and the tests that ran, and explains each meaningful run. Use the agent's own transcript for every command.
Sources
- Claude Code interactive mode, commands and how Claude Code works, checked October 25, 2026.
- Codex developer commands, checked October 25, 2026.
- Cursor terminal, checked October 25, 2026.
What you need
- A Mac with Apple silicon and macOS 12 or later.
- Claude Code, Cursor or Codex.
- A Git project. No commit, push, remote or GitHub repository is needed.
- A GitHub account, to sign in. BuildGist does not access your GitHub repositories.
Codex needs you to approve BuildGist once, in Codex. BuildGist shows the steps. Setup is in Getting started.
To explain a run, your computer sends BuildGist what that run needs, and BuildGist passes it to Anthropic. BuildGist does not keep this material. It does not send your whole repository, files the run did not change, or files named like secrets, such as .env files and keys. It keeps the explanation and short cited excerpts of changed code, at most 12 lines each. Secret masking is best-effort. Privacy has the full list.
Every account gets 7 days of BuildGist Pro free, with no card. The 7 days start at your first explanation or Continue handoff. Nobody is charged when the trial ends. After that, BuildGist Pro is $12 per month, plus any applicable tax shown at checkout. See pricing.
Try BuildGist Download for Mac
Apple silicon, macOS 12 or later. United States, 18 or older.
Related
- What did Claude Code change?
- Switch from Claude Code to Codex
- Understand code an agent wrote
- Hand off Claude Code to Cursor
- Review what Codex changed
- You’ve hit your session limit in Claude Code
- You’ve hit your usage limit in Codex
- Keep context across agents
- Review AI code before merging
- BuildGist or the git diff
- Claude Code session history
- Undo Claude Code changes
- BuildGist vs CLAUDE.md, AGENTS.md and HANDOFF.md
- Keep context from Claude Code to Cursor
- Resume an agent session in another tool
- BuildGist vs Conductor
- Codex context window full
- Undo Codex changes
- Cursor usage limit reached
- Review Cursor agent changes
- Codex session history location
- Your conversation is too long in Cursor
- One default coding agent, or two?
- Tools that summarize agent sessions
- Switch from Codex to Claude Code
- Move from Cursor to Claude Code
- Switch from GitHub Copilot to Claude Code
- Move from Windsurf to Cursor
- Switch from Gemini CLI to Claude Code
- Coding agent crashed mid-task
- Claude Code lost context after compacting
- Turn an agent session into a PR description
- Which coding agents read AGENTS.md?
Questions: kayvanandre@gmail.com.