My Agents Fought Over My Keychain

·

·

3–4 minutes
Title card for "My Agents Fought Over My Keychain". Car keys with keychain

I had several AI coding agents running in parallel on my Mac, each on its own task. Then the password prompts started. The macOS keychain asking for access. I approved it. It came back. I approved it again. It came back again.

For a while I thought my laptop had a bug. It didn’t. My agents did exactly what they were allowed to do, and one of them quietly changed something none of the others expected.

What Actually Happened

One agent, somewhere in the middle of its task, quietly switched git pushes from SSH to HTTPS. It didn’t ask. It didn’t mention it. From its point of view it was a small detail on the way to getting the job done.

HTTPS pushes need credentials. My system git configuration, the one that ships with the tooling and that I had never looked at, adds the macOS keychain as a credential helper. So every HTTPS push asked the keychain for a password. And with several sessions pushing, fetching, and retrying in parallel, the keychain asked me. Over and over.

No single agent did anything wrong in isolation. Each one made a reasonable local decision. Together they turned my machine into a slot machine of password dialogs.

The Real Problem Was My Attention

Here is what bothers me more than the bug. After enough of those prompts I caught myself clicking “allow” without reading. That is exactly the habit a credential prompt is designed to prevent.

A keychain dialog is a security control. It works only if a human pays attention to it. When something fires it repeatedly, the control quietly stops working, because the human stops being a control and becomes a reflex. If one of those prompts had been for something that actually mattered, I would have approved that too.

This is the part of running parallel agents nobody talks about. Your machine is a shared environment. Git config, credential helpers, SSH agents, environment variables, global tool settings. One agent changing any of them changes the world for every other session, and for you.

I wrote earlier this year that the new burnout comes from watching, not building. This is the security version of that. Supervising agents is mostly interruptions, and interruptions are where judgment goes to die.

The Fix, and the Lesson

The immediate fix was one line. I emptied the credential helper in my global git config, git config --global credential.helper "", which overrides the helper inherited from the system config. No helper, no keychain prompts. Git authentication goes through the path I chose on purpose instead of the one that happened to be there.

Finding it took much longer than fixing it, because the cause wasn’t in any repo and wasn’t in any file I had ever edited. It was in a layer of configuration I didn’t know I was depending on. If you ever need to hunt down something like this, git config --list --show-origin shows every setting and the file it comes from.

The broader lessons:

  • Agents shouldn’t change global configuration. Repo-local changes are fine. Changes to your global git config, shell profile, or credential setup should require explicit approval.
  • Know your credential path. If you can’t explain how a git push authenticates on your machine, an agent will find a path for you, and it may not be the one you want.
  • Repeated prompts are a bug report. The second identical security prompt is the moment to stop and investigate, not the moment to click faster.
  • Isolate parallel work. Separate worktrees help with code. They don’t help with shared global state. The more agents you run, the more that state matters.

Running several agents at once feels like having a team. But a team shares an office, and somebody always changes the thermostat.

What’s the strangest thing an agent has changed on your machine without telling you?


If this resonated with you, I would love to hear your perspective. Drop me a message or connect with me on Twitter (X) or LinkedIn. I write regularly about the intersection of AI, software engineering, and leadership at ivanturkovic.com.

Ivan Turković
Software Architect & Engineering Leader · 20+ years

Work with me →

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

×