dgtlchika

Trace Leftover — AI skill for Claude Code

AI community

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/sessions and 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 ~/.codex session records, SQLite databases and top-level records (including auth.json, the plaintext credential store), plus the log/ and shell_snapshots/ stores.
  • Claude Code — scan ~/.claude session records the same way, including the sessions/, shell-snapshots/, backups/, session-env/, state/ and telemetry/ stores, plus the main config ~/.claude.json in the home root (user-scope and per-project mcpServers, whose env blocks 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 same env / credential content as the live file), plus the MCP server lo