Every AI coding CLI you run is writing the full conversation to disk. Lucian Ghinda has six of them installed and spent time in July 2026 tracking down exactly where each one stores its session files, what format it uses, and whether anything ever gets cleaned up automatically.
The short answer: only one tool deletes old sessions for you, only two document where the files live, and one of those 2.6 GB log files belongs to opencode.
The quick reference table
| Tool | Path | Format | Auto-deletion |
|---|---|---|---|
| Claude Code | ~/.claude/projects/<project>/<session>.jsonl | JSONL | 30 days default (cleanupPeriodDays) |
| Codex CLI | ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (undocumented) | JSONL | None for rollouts |
| Cursor CLI | ~/.cursor/chats/<id>/<uuid>/store.db (undocumented) | SQLite | None |
| Amp CLI | ~/.local/share/amp/threads/T-*.json plus server copy | JSON per thread | Server side only, 30 days after deletion |
| opencode | ~/.local/share/opencode/opencode.db | SQLite | None |
| pi | ~/.pi/agent/sessions/--<cwd>--/<ts>_<uuid>.jsonl | JSONL, tree-shaped | None |

Five things worth knowing
- Transcripts are plaintext. As Claude Code’s own docs state, OS file permissions are the only protection. If an agent ever read a
.envfile during a session, those values are now sitting unencrypted in your home directory. - Only Claude Code auto-deletes. Its
cleanupPeriodDayssetting defaults to 30 days (minimum 1). Every other tool accumulates sessions until you manually intervene. Ghinda’s opencode log file hit 2.6 GB with no size cap in place. - The Codex
[history]config is a trap. Settingpersistence = "none"in the[history]section stops writing~/.codex/history.jsonlbut does not stop the full rollout files insessions/. Those keep landing regardless. - Cursor CLI and the IDE use separate stores that do not sync. ACP-mode sessions go to a third location,
~/.cursor/acp-sessions/. None of this is documented. The~/.cursor/chatspath was confirmed by Cursor staff on a forum post, not in the official docs. - Environment variables move these paths silently.
XDG_CONFIG_HOMErelocated Ghinda’s entire Cursor chat store.CLAUDE_CONFIG_DIR,CODEX_HOME, andPI_CODING_AGENT_DIRdo the same on purpose. Check your env before trusting any path.
The two honest outliers
Amp stores the real copy on its servers and syncs a local mirror to ~/.local/share/amp/threads/. Deleted thread data is removed within 30 days of deletion on the standard plan. Zero data retention is an Enterprise feature.
pi is the best-documented tool in the group. It publishes the path, the deletion flow, and the complete on-disk format. Its /share command exports the session to HTML and uploads it as a secret GitHub gist in your own account. No vendor server holds the data.
The practical check to run today
Look at whether these directories fall inside anything you sync or back up. Dropbox, iCloud, and Time Machine will copy plaintext transcripts of every session you have ever run, and nothing in the setup prompts you first.
Full breakdown with paths, schema details, and the opencode SQLite migration notes at the source link.
