Trace Leftover — AI skill for Claude Code
Read-only scanner that finds secret-like leftovers in AI agent session records (Codex CLI / Claude Code).
How to install Trace Leftover
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open dgtlchika/trace-leftover and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Trace Leftover does
Read-only scanner that finds secret-like leftovers in AI agent session records (Codex CLI / Claude Code). Masked output, offline.
Alternatives in AI
- Memory Forge Rs — Stop resetting satisfying AI chats — edit the memory instead 474 ★
- Vibe Cockpit — Real-time monitoring dashboard for AI coding agent fleets: session health, output streaming, and observability 26 ★
- Codexplain — Codex explanations suck 17 ★
README
trace-leftover
A read-only scanner that finds secret-like leftovers in AI agent session records.
AI coding agents keep full session records on your disk — prompts, tool calls, everything you pasted into them. If a secret (an API key, a token, a password) ever went through one of those sessions, it may still be sitting there in plaintext, long after you deleted the session from the UI.
**trace-leftover scans those records and shows you what is left behind — masked, offline, and read-only.**
Why this exists
On 2026-11-29, I measured this on two machines (a Linux VM running Codex CLI 0.164.0-alpha.9, and a Windows PC running Codex CLI 0.172.0) with dummy marker strings:
- A marker pasted into a Codex CLI session remained in plaintext in the session records under
~/.codex/sessionsand in the SQLite databases. - The marker survived
codex delete— the rollout file was deleted, but the marker was still present in both SQLite databases (including WAL). - With
--ephemeral, the marker did not remain. - The same pattern reproduced identically on both versions and both operating systems.
In other words: "deleted" sessions can leave secrets behind. This tool exists to make those leftovers visible.
Scope
- Codex CLI — scan
~/.codexsession records, SQLite databases and top-level records (includingauth.json, the plaintext credential store), plus thelog/andshell_snapshots/stores. - Claude Code — scan
~/.claudesession records the same way, including thesessions/,shell-snapshots/,backups/,session-env/,state/andtelemetry/stores, plus the main config~/.claude.jsonin the home root (user-scope and per-projectmcpServers, whoseenvblocks commonly hold plaintext API keys) and top-level timestamped backups and stale temp copies of JSON records (e.g.settings.json.bak-and.credentials.json.tmp., which carry the sameenv/ credential content as the live file), plus the MCP server lo
Related Skills
Klarion
AI-powered secret scanner for code and git history. Finds leaked API keys, tokens and credentials with near-ze
Motus
Keep API keys and tokens out of your AI coding agent. Redacts exact secret values from tool output and session
Mcpv
Offline, encrypted secrets for AI coding agents. Keep mcpm:// references in your .env; mcpv run resolves them
Guard Layer
Runtime guardrails between an AI agent and its tools: scan what it reads, gate what it does, and track the ses
Env2hell
Stops an AI assistant from printing your API keys into the session. Denies env dumps, gives it a masked replac
Routeledger
Which model actually served each turn of your Claude Code session, and where routing quietly diverged from wha
Related Agents
Secret Rotation Guide
Given masked secret findings from secrets_scan.py, lists the rotation steps per provider in the right order, w
Codex Debugger
Root-cause a failing test, crash, stack trace, or misbehaving feature by delegating the investigation to OpenA
Abtop
AI agent monitor for your terminal. Like btop++, but for AI coding agents. Supports Claude Code and Codex CLI.