Where AI Coding Agents Store Session History (2026 Path Map)

Every terminal and IDE coding agent writes your prompts, tool calls, and diffs to a different local folder. Below is the complete on-disk map for macOS and Linux, plus a zero-dependency Python CLI (l2cache-app/agent-history-paths) to inspect them.

1. All 7 Coding Agent History Paths in One Table

Agent macOS / Linux Storage Path Format & Notes
Claude Code ~/.claude/projects/<project>/<session-id>.jsonl Per-project append-only JSONL; isolated per working directory.
OpenAI Codex CLI ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl Date-sharded rollout JSONL files.
Cursor ~/Library/Application Support/Cursor/User/workspaceStorage/*/state.vscdb SQLite workspace state + agent transcripts under ~/.cursor/projects/.
GitHub Copilot ~/Library/Application Support/Code/User/workspaceStorage/*/chatSessions/ JSON files scoped by VS Code workspace hash.
Grok CLI ~/.grok/sessions/ JSONL / JSON session logs.
OpenCode ~/.local/share/opencode/opencode.db Embedded SQLite database rather than flat transcript files.
Google Antigravity ~/.gemini/antigravity/brain/<conversation-id>/ Conversation transcripts + markdown artifacts.

2. Inspect Your Local History Stores

Clone or download agent_history_paths.py to see which agent stores exist on your machine, how many files they have, and their disk usage:

git clone https://github.com/l2cache-app/agent-history-paths.git
cd agent-history-paths
python3 agent_history_paths.py --all

3. Search & View Sessions Across All Projects

Raw grep across nested JSONL and SQLite stores breaks down quickly once you have hundreds of sessions—and running claude --resume on an expired prompt cache can re-write 100k+ tokens at 1.25× cost.

GUI & Web Tools for Coding Agent History: Compare Mac Session Apps → Open Free Web Viewer →