Answer

Where are Claude Code, Codex and Cursor transcripts stored?

Last checked ยท 4 sources

Claude Code writes each session to ~/.claude/projects/<project>/<session-id>.jsonl, one JSON object per line, and by default deletes files older than 30 days. Codex CLI keeps its local state, including session transcripts, under ~/.codex. Cursor writes agent transcripts as JSONL files which, according to a reply on its forum, leave out tool outputs.

Where exactly is the Claude Code file?

Claude Code's documentation gives the path as ~/.claude/projects/<project>/<session-id>.jsonl, where the project folder is your working directory's path with every character that is not a letter or a digit replaced by -. Names longer than 200 characters are cut to 200 with a hash of the full path added. The CLAUDE_CONFIG_DIR environment variable moves the whole store somewhere else.

Next to the session file, a folder with the same name holds subagents/, the transcripts of subagents the session started, and tool-results/, large tool outputs written to separate files. Your typed prompts across all projects are also kept in ~/.claude/history.jsonl.

How long are Claude Code transcripts kept?

Thirty days by default. Claude Code deletes transcript files older than the cleanupPeriodDays setting, which defaults to 30 and has a minimum of 1. Raise it in settings.json if you want to keep practice sessions longer, or copy the files you care about somewhere safe. claude purge deletes a project's transcripts sooner.

What is inside a transcript?

Everything that happened in the session: every message, tool call and tool result, one JSON object per line, plus metadata entries. The documentation is explicit that the files are plain text, and that anything passing through a tool, such as file contents, command output or pasted text, is written into them. Read a transcript before you share it.

It also warns that the entry format is internal and changes between versions, so a script that reads the files directly can break on any release. For a readable copy, run /export inside the session; for scripts, the documentation points to the structured output of claude -p and to hooks.

Where does Codex CLI keep sessions?

OpenAI's Codex documentation says Codex stores its local state under CODEX_HOME, which defaults to ~/.codex, and that it saves local session transcripts there by default, with ~/.codex/history.jsonl as the history file. Setting persistence = "none" under [history] in the config turns persistence off.

The documentation does not name the sessions subfolder. Community write ups describe rollout files at ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl, each line an envelope with a timestamp, a type and a payload, and that is the layout our stats tool reads. Expect it to change between versions.

What about Cursor?

Cursor writes agent transcripts as JSONL. In a reply on Cursor's community forum in April 2026, the files were described as holding your messages, the assistant's text responses and the inputs of tool calls, with tool outputs left out on purpose because they can be very large. The same reply suggested a hook to log tool outputs yourself.

Community reports place the files under a project folder in ~/.cursor/projects/; we could not confirm the exact path on a Cursor documentation page, so check your own machine. Our stats tool does not read Cursor files yet.

How do I get counts from my own transcript?

Drop a Claude Code session file or a Codex rollout file on the transcript stats tool. It reads the file in your browser and uploads nothing; the page blocks network requests from its own scripts. You get counts such as prompts, tool calls by type, rejected edits, test runs and session length, labelled as counts, not a score.

For judgment rather than counts, use the review prompt that comes with each of our practice rounds.

Sources

  1. Claude Code docs: managing sessions and where transcripts are storedProduct documentation. Current docs. Checked 18 October 2026.
  2. Claude Code docs: what the ~/.claude directory holds and how long it is keptProduct documentation. Current docs. Checked 18 October 2026.
  3. OpenAI Codex docs: advanced configuration and local historyProduct documentation. Current docs. Checked 18 October 2026.
  4. Cursor forum: what Cursor's agent transcripts containCommunity forum. April 2026. Checked 18 October 2026.

Last checked: .