Urgent.News

What's breaking now, across thousands of outlets.

AI

Where Claude Code, Codex and Cursor Keep Your Chat History on Disk, and How to Read It

Why your session history matters more than you think Claude Code chat history is stored on your own machine as plaintext JSONL files under ~/.claude/projects/ , one file per session, and deleted after 30 days by default. On Windows the same folder is %USERPROFILE%\.claude\projects\ . Codex and Cursor keep their own records in their own places and formats. Paths and defaults below were last…

Claude Code, Codex, and Cursor each store their session histories in different locations on your machine. Claude Code keeps its chat logs as plaintext JSONL files in the ~/.claude/projects/ directory, with one file per session. These files are automatically deleted after 30 days by default, although this can be adjusted. Codex stores its session logs in dated rollouts located at ~/.codex/sessions/YYYY/MM/DD/rollout-timestamp-uuid.jsonl, while Cursor uses SQLite databases named state.vscdb in the User folder on macOS, Linux, and Windows.

It's important to note that these files hold more than just your typed prompts; they also contain file contents, command output, and pasted text. While searching and deleting these files is possible using command-line tools like grep and sqlite3, keep in mind that transcripts and rollouts can be quite voluminous, potentially consuming a significant portion of your API usage limits.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

More from Friday 6 November →