What jumps out to me is not that Claude Code can do something clever with approvals, but that a product aimed at developers can still stumble over the oldest, dullest problem in the book: “don’t put sensitive stuff in files that might get committed.” That is not exotic AI failure. It is basic operational hygiene, and it still managed to leak passwords and API keys into public GitHub repos.
The part I find most annoying is the “Yes, and don’t ask again” flow. I can see why it exists; nobody wants to click through prompts all day. But if the convenience shortcut ends up serializing the approved command into a local settings file, and that command includes secrets, then the UX is doing too much behind the scenes. This is exactly the kind of thing that feels safe because it lives in a hidden config file, until it doesn’t. The moment that file gets into a repo, the abstraction falls apart.
I also don’t buy the reassuring angle that this is basically a user mistake. Sure, a settings file on a local machine is fine. But tools like this are supposed to reduce footguns, not create new ones with a shrug and a .gitignore. If a file is sensitive enough that Anthropic tells people not to check it in, then relying on a global ignore entry feels brittle. Repos move between machines. Projects get copied, nested, reinitialized, archived, forked. Real workflows are messy. The tool should assume that, not ideal behavior.
The more interesting detail here is that secret scanners missed some of the exposed material. That tells me two things. First, “just run a scanner” is not enough advice. Second, the format of these settings files probably makes detection harder than people expect. That might be where the real fix lives: not in telling users to be careful, but in making Claude Code stop persisting sensitive approvals in a way that can be committed at all, or at least redacting obvious secrets before they ever hit disk.
I’m also a little skeptical of the “this only happens when files were manually created and checked in” framing. Maybe that’s true for the narrowest reading of the bug, but the article describes cases where Claude Code itself can commit changes without the user realizing what got written. If the boundary between user action and tool action is fuzzy, the product has already failed in the way that matters.
What I’d do, if I were building this, is treat any approval record as toxic by default. Store the minimum possible state, never the raw command if it can contain secrets, and make the dangerous path opt-in with very loud warnings. I’d also want an explicit redaction layer before anything touches a file. Not perfect, but better than hoping a hidden settings file never escapes its machine.
Reference: Claude Code is accidentally exposing secrets all over GitHub