Your AI agent's history is quietly storing the API keys you pasted into it
Summary
A developer highlights that AI agent history files store API keys pasted into prompts, and introduces an open-source CLI tool to scan and redact those secrets locally.
Similar Articles
If you're new to coding agents: they keep a diary, and your API keys are in it
Coding agents like Claude Code, Cursor, and Codex save session logs locally, potentially exposing sensitive data like API keys and environment variables. A developer named Ishan created an offline tool to scan and redact secrets from these logs, addressing a common security blind spot.
We gave our agents production API keys which I'm starting to think was a mistake
A cautionary tale about the risks of granting AI agents production API keys, highlighting potential unintended consequences.
How does your agent actually get its API keys?
A developer discusses three common patterns for how coding agents obtain API keys, highlighting that agents can circumvent restrictions by being resourceful, and asks the community about their real-world setups and experiences.
Show HN: OneCLI – OSS credential gateway that keeps secrets out of AI agents
OneCLI is an open-source credential gateway that injects secrets into AI agent requests transparently, keeping API keys hidden from the agents.
Show r/AI_Agents: Stop your agents from breaking tool calls in production — we built a reliability layer for 2,000+ APIs
Swytchcode is a CLI tool that acts as a reliability layer for AI agents, automatically handling authentication, retries, compliance, and idempotency across 2,000+ APIs to prevent agent errors in production.