Clean Up Plaintext Secrets Left by AI Coding Agents
Ishannaik · reddit · 2026-07-12
agentsweep is an open-source CLI tool designed to find and clean up plaintext secrets saved to disk by AI coding agents. Examples provided by the author include Codex, Cursor, Claude Code, Cline, Aider, and Windsurf.\n\nThe Problem It Solves\n- After you paste API keys, DB URLs, .env files, or even wallet mnemonics to an agent, many tools write this data into local history files\n- These histories are repeatedly read by the agent for context, meaning plaintext secrets could resurface in subsequent files, commands, or replies\n\nFeatures\n- Uses about 191 secret detection rules (ported from gitleaks)\n- Adds extra support for detecting BIP-39 mnemonics\n- Runs in read-only scan by default; requires manual confirmation before rewriting\n- Supports in-place redaction, .bak backups, post-write verification, and full rollbacks\n- Works out of the box for about 30 agents\n\nThe project is MIT licensed, and the author clarifies they are not selling anything.
More from coding & agent
- Cognition's SWE-2 uses a KKT duality argument in RL to shift the effort Pareto curve — YouJiacheng · 2026-09-11
- First-ever Three.js Conference lands in Paris, with a panel on AI-shortened design workflows — OdinLovis · 2026-09-11
- Data engineering, not agent frameworks, is the real bottleneck for enterprise AI agents — dhruv2038 · 2026-09-11
- RTK Terminal Compression Cuts Tokens but Leaves Your AI Coding Bill Unchanged — Bartaseth · 2026-09-11
- GPT-6 Astra beats Factorio with enemies in 44 in-game hours at ~$4,500 API cost — liminal_bardo · 2026-09-11
- Investment Analyst Asks How to Build a Claude-Based Diligence Agent Stack — Careless_Tie2286 · 2026-09-11