guide
By ReclaimLLM TeamEvery agent session leaves JSONL on the laptop—and pasted keys go with it. Per-tool paths, a safe scan recipe, and the fix order: rotate, purge, prevent.
~/.claude/projects/. Codex sessions: ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (separate history.jsonl is a prompt index, not synced by rclm-sync).AI coding agents save each session as a local transcript—usually JSONL under your home directory. Anything pasted, printed, or read in that session, including API keys from .env files or CI logs, is written there in plain text. The leak surface is often the laptop copy, not the model provider’s dashboard. Treat transcripts like a secrets file: scan, rotate, purge, and redact before new content is written.
GitGuardian’s 2026 analysis of public GitHub commits reported a 3.2% secret-leak rate in commits associated with Claude Code assistance versus a 1.5% baseline across all public commits (AI coding agents and credential security). That statistic does not prove Claude Code caused the leaks—it shows assisted workflows correlate with more exposed credentials. Local transcripts are one reason pasted keys linger after the chat ends.
For prevention at the source, see prevent API keys and .env from AI coding tools. This post is the after-the-fact map.
Live hooks receive transcript paths from each tool at runtime. The table below matches ReclaimLLM’s rclm-sync historical import paths—what we glob in production when backfilling past sessions—and aligns with vendor docs where noted.
| Tool | Path on disk | Notes |
|---|---|---|
| Claude Code | ~/.claude/projects/**/*.jsonl | Anthropic documents local caching under the Claude directory; default local retention is adjustable via cleanupPeriodDays in data usage |
| Codex CLI | ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl | Full session transcripts. Separate file: ~/.codex/history.jsonl is a prompt-index style log—not imported by ReclaimLLM sync |
| Cursor | ~/.cursor/projects/[project]/agent-transcripts/[session-id]/[session-id].jsonl | Cursor passes the path to hooks at session end (hooks docs) |
| GitHub Copilot | ~/.copilot/session-state/**/events.jsonl | Agent / CLI session events |
| Antigravity | ~/.gemini/antigravity-cli/brain/<id>/.system_generated/logs/transcript.jsonl | Concrete path used by ReclaimLLM sync (Antigravity hooks) |
If you use only one tool today, still read the full table—engineers often run two agents on the same repo.
When someone says “I pasted a key into Claude,” your first question should be where a copy still exists. Provider dashboards may not show the full tool output chain. Local JSONL does—including intermediate Read results and Bash stdout embedded in the conversation record. ReclaimLLM’s Cursor capture uses transcripts as the source of truth for the same reason: the file on disk is the complete artifact.
Historical import via rclm-sync walks the directories above so past sessions appear in the console even before hooks were installed. That helps audits; it also means org capture can duplicate sensitive lines you already rotated—set retention and legal hold accordingly (settings and compliance docs).
Transcripts are not only in the obvious folder:
~ or dotfile repos..claude or .cursor history by mistake.Two different retention stories apply to Claude Code:
/feedback, /bug, and /share reports are retained for five years per data usage. Those docs do not promise secret redaction on that standard upload path—do not assume it./feedback falls back to a local archive (third-party providers without Anthropic credentials), known API key/token patterns are redacted before that local file is written.ReclaimLLM does not delete or rewrite provider-owned transcript files on disk. Capture and redaction apply to what ReclaimLLM stores and what hooks see going forward.
Use a secrets scanner on the paths above—never paste real findings into Slack or tickets.
AKIAFAKEFAKEFAKEFAKE (example only).gitleaks dir ~/.claude/projects --no-git
Or:
trufflehog filesystem ~/.codex/sessions
Scan each agent directory your team uses—mixed fleets are common after a Cursor pilot and a Claude Code rollout. Add Antigravity brain logs if Google’s CLI is approved in your org. Exclude node_modules and build output if the scanner supports ignore rules to cut noise.
For teams without a dedicated forensics bench, run scans from a clean admin machine with read-only mount of the laptop disk image during offboarding—same paths, same commands.
Order matters:
For detection going forward, configure AD-004 sensitive-file alerts.

| Control | What it does | Limit |
|---|---|---|
| Deny rules | Block Read(./.env) and similar | Shell paths may bypass Read |
.claudeignore / env deny patterns | Reduce accidental reads | Not a crypto boundary |
| Hook redaction | Local redaction replaces configured strings and excludes folders | String replacement, not semantic DLP |
| Egress guard | Blocks common exfil commands before shell runs | Does not erase past transcript lines |
When ReclaimLLM’s hook runs, recognized .env reads are sanitized or denied. Hook crash or timeout can still fail open unless you configure vendor hook failure modes yourself—ReclaimLLM’s installer does not set Claude onFailure: "block" or Cursor failClosed.
ReclaimLLM captures from provider transcripts; the provider’s own file on disk may still hold unredacted text after redaction in flight (capture model caveat). ReclaimLLM-owned local artifacts use owner-only permissions.
Pair prevention with governance: a one-page policy should name transcript retention next to approved tools—see AI coding agent governance for small teams. Coverage alerts tell you when hooks disappear; they do not purge old JSONL—purge is still a local IT task.

If you use ReclaimLLM capture:
Session sharing uses opaque tokens—treat shared links like any other confidential URL.
Email alerts for secret patterns (AD-004) fire on exfiltration detectors—they do not replace transcript purge. Use alerts to find the session id, then locate the on-disk JSONL path from the table above for local cleanup.
Copy for IT when a developer leaves or a laptop is reissued:
~/.claude/projects, ~/.codex/sessions, ~/.cursor/projects, ~/.copilot/session-state, Antigravity brain logs for live patterns.~/.gemini/antigravity/mcp_oauth_tokens.json) if present.Redact secrets before they hit the transcript—start free. For the DLP product story, see AI coding assistant DLP. Deep dive on what is AI DLP.
Under ~/.claude/projects/ as JSONL session files. Adjust local cache duration via Claude Code settings documented in Anthropic’s data usage page.
Full sessions: ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl. The separate ~/.codex/history.jsonl file is a prompt index—not the full transcript and not synced by ReclaimLLM’s historical import.
Yes, if a developer pasted a key, the agent printed tool output with credentials, or a file read embedded secret material in the conversation. Transcripts are plain text on disk.
After rotating exposed credentials, yes—delete or shorten retention to reduce backup and forensic risk. Deletion does not replace rotation.
No. Hook redaction affects new tool calls and what ReclaimLLM captures going forward. Purge provider transcript files separately and rotate the secret.