Data licensing for US companies with 20+ employeesoffer@getdataoffer.com

Agent traces

Where coding agents store your session history

The local folders and files where Claude Code, Cursor, Codex, Gemini CLI, Cline, Aider, Copilot Chat and other coding agents keep conversation history.

Hands lifting a stack of folders from an open filing cabinet drawer

Almost every coding agent keeps a local record of your conversations. Some use plain JSON or JSONL files you can open in a text editor. Others tuck history inside a SQLite database in an editor's storage folder. If you want to back it up, delete it, audit what it contains, or sell it, the first step is knowing where it lives.

This guide lists the locations that our dataoffer tool checks for each of the sixteen agents it supports. Paths can change between versions of a tool, so treat this as a map, not a guarantee.

A note on platform paths

Editor-based tools (Cursor, Windsurf, VS Code extensions) keep data in a "user data" folder whose location depends on your operating system:

Platform VS Code-style user folder
macOS ~/Library/Application Support/<Product>/User
Linux ~/.config/<Product>/User
Windows %APPDATA%\<Product>\User

<Product> is Code for VS Code, Code - Insiders for the Insiders build, Cursor for Cursor and VSCodium for VSCodium. Inside that folder, globalStorage holds data shared across projects and workspaceStorage holds one subfolder per workspace.

Terminal tools usually use a dot-folder in your home directory instead, such as ~/.claude or ~/.codex.

Terminal agents

Claude Code

Sessions are JSONL files under ~/.claude/projects/, with one subfolder per project directory you've worked in. Each line is one event: a user message, an assistant message, a tool call or a tool result. Because sessions are grouped by project, it's straightforward to include one project and leave out another.

Codex CLI

Sessions are JSONL files under ~/.codex/sessions/, organized by date. Lines record messages, function calls and their outputs. Since the folders are by date, one day's folder can mix several repositories.

Gemini CLI

History lives under ~/.gemini/, in JSON and JSONL files with names that include words like chat, session, history or checkpoint.

OpenCode

OpenCode stores sessions under ~/.local/share/opencode/, with older or alternative layouts in ~/.opencode/ or ~/.config/opencode/. Depending on version, messages may be separate JSON files or rows in a local database.

Pi

Pi keeps JSON or JSONL history in ~/.pi/ or ~/.config/pi/.

Aider

Aider writes a Markdown transcript named .aider.chat.history.md into the root of each project you run it in. That means its history is spread across your project folders rather than in one central place. The tool searches your home directory a few levels deep for these files.

Amp

Amp history may be in ~/.amp/, ~/.config/amp/ or, for the editor extension, VS Code's globalStorage/sourcegraph.amp folder, in JSON or JSONL files named for threads or sessions.

Goose

Goose stores sessions in ~/.local/share/goose/sessions/ or ~/.config/goose/sessions/, usually as JSONL.

Editor-based agents

Cursor

Cursor keeps chat and composer history inside SQLite databases named state.vscdb: one in globalStorage and one in each workspaceStorage subfolder. These are key-value tables, and conversation data is stored as JSON values. The tool opens them read-only. Some installs also have JSON files under ~/.cursor/.

Windsurf / Codeium

Windsurf and Codeium history can appear in ~/.codeium/, ~/.windsurf/, and in Windsurf's own state.vscdb databases, under keys related to Cascade or chat.

GitHub Copilot Chat

Copilot Chat saves sessions as JSON files in workspaceStorage/<id>/chatSessions/ inside the VS Code user folder, one folder per workspace.

Cline, Roo Code and Kilo Code

These three related extensions keep one folder per task under VS Code's globalStorage:

Extension Folder under globalStorage
Cline saoudrizwan.claude-dev/tasks/
Roo Code rooveterinaryinc.roo-cline/tasks/
Kilo Code kilocode.kilo-code/tasks/

Each task folder contains api_conversation_history.json, the full message history in the model API's format, and ui_messages.json, which is what the extension displays. The tool checks these folders under VS Code, VS Code Insiders, Cursor and VSCodium, since the extensions can run in any of them.

Continue

Continue stores sessions as JSON files in ~/.continue/sessions/.

Zed Assistant

Zed keeps assistant threads in a database under its data folder (~/.local/share/zed/ on Linux, ~/Library/Application Support/Zed/ on macOS) and older conversations as JSON in a conversations folder.

What these files contain

Whatever the format, a typical session contains more than the chat you saw:

  • every prompt and reply;
  • tool calls with their arguments, such as the command the agent ran or the file it edited;
  • tool results, which can include whole file contents, command output and environment details;
  • model names and timestamps;
  • absolute file paths, which usually include your username.

Tool results are where sensitive data hides. If the agent ran cat .env or printed a config file, the secrets in it are now in the session log. That's why the dataoffer scrubber drops the contents of files like .env, *.pem, *.key, credentials.json and .npmrc entirely, and why we recommend reading our guide on removing secrets and PII from agent logs before sharing any of this anywhere.

Finding them automatically

Rather than checking each path by hand, you can run:

curl -fsSL https://getdataoffer.com/traces/install | bash
dataoffer status

status reports which of the sixteen supported tools it found and how many files each has, without reading their contents. dataoffer preview goes further, scrubbing what you approve and showing counts, still with no network calls.

Housekeeping: backing up and deleting

Knowing where history lives is useful even if you never sell it.

  • Backups. Copying ~/.claude/projects or a task folder is a simple way to keep a record of how a project was built.
  • Cleanup. If you once pasted a secret into a session, deleting the session file removes it from your machine. Rotate the secret anyway.
  • Disk space. Long-running users can accumulate a lot of history, especially from tools that store full command output.

Close the tool before deleting its files, particularly SQLite databases, which can be corrupted if they change while open.

Frequently asked questions

Does every coding agent keep history locally?

Most do, but not all of it is complete. Some tools keep only what the interface shows, while others keep the full API conversation, including tool calls and results. Cloud-hosted agents may keep history on the vendor's servers instead.

Is it safe to open these files?

Reading them is safe, but open SQLite databases read-only and close the app first. Don't edit them by hand while the tool is running.

Why does the tool search my home directory for Aider?

Aider writes its history file into each project folder rather than a central location, so finding it means looking through project directories. The search is limited to a few levels deep.

Can I point the tool at a custom folder?

The tool discovers the standard locations listed here. If you keep history somewhere unusual, it may not find it.

Do these paths include my username?

Usually, yes. Absolute paths in session logs typically start with your home folder, such as /Users/yourname/. The scrubber replaces home-folder usernames with placeholders on macOS, Linux and Windows.

Will deleting history break the tool?

Generally no. You lose the ability to resume old sessions, but the agent keeps working. Check the tool's own documentation if you're unsure.

Next steps

If you'd like to see what your history would look like after scrubbing, the traces page has the install line and a real before-and-after example.

Contribute your agent sessions

The dataoffer tool scrubs every session on your machine before anything leaves it. Start with a preview: it makes no network calls and writes nothing.

This guide is general information, not legal, tax or financial advice. Figures and ranges are illustrative; talk to qualified advisors about your situation.