Solutions
Keep your API keys away from AI coding agents
Vault lets an agent run commands that use your API keys and tokens without ever holding the value: the secret stays on your Mac and reaches only the command that needs it. Vault is part of Pro.
AI coding agents run real commands: pushing to GitHub, calling APIs, deploying. Those commands need secrets. The usual answer is to drop keys into a .env file or export them in the shell. But then the agent, its logs, its terminal scrollback, and its context window can all read the raw value, and a single leaked or malicious command can exfiltrate it. GitGuardian's State of Secrets Sprawl 2026 found AI-service leaks up 81% year over year, and a share of that is exactly this: a key sitting somewhere an agent could read it from.
The agent receives the command's result (a successful push, an API response), but the plaintext key never appears in a prompt, a log, the chat history, or the agent's own process environment. You can require a Touch ID approval on every use, or grant a short standing window. Secrets never sync in the clear: a second Mac is admitted only by comparing a short code with one already enrolled, and removing a Mac means what it had stops working.
How it works
- 1Store the secret once in Vault: it stays stored locally on your Mac, never in a prompt, a log, or the chat.
- 2Grant it to a specific Thread so only the agents in that Thread can use it (deny-by-default everywhere else).
- 3The agent runs its command through Vault, for example: forkbench-secret exec GITHUB_TOKEN -- git push.
- 4Optionally require Touch ID for every use, so no command runs with a secret without your fingerprint.
Straight about the guarantee: A seatbelt, not a guarantee: an agent you deliberately authorise for a command could still print what that command handed back. This stops accidental exposure during normal use; it does not defeat a command you told it to run.