What fidelius Protects Against.

In normal use your keys aren't in files or shell history, and when Claude Code or Codex runs a command through accio, a key that gets printed by accident is masked on a best-effort basis. It isn't a sandbox: anything running as you can still ask for a key.

What it protects against

Keys sitting in plain-text files

A .env in every project, exports in ~/.zshrc, a keys file in your home folder. Any agent, script, backup tool or git add . can pick those up. With fidelius the keys are in your Keychain, and accio myproject npm run dev hands them to that command as environment variables. Key files such as .p8 and .pem arrive as a path to a temporary file that is deleted when the command ends. You can still export a .env when a tool insists on one; fidelius asks for Touch ID first.

An agent opening your keys by accident

When you choose Setup > Add to My Agents Automatically, fidelius adds a short section to the global instructions of Claude Code, Codex, and Gemini CLI and Antigravity, and shows you the change first. It tells the agent to run commands through accio, to list key names with accio list, and not to print values or search files for them. An agent that follows it has no reason to open a key.

Your own program printing a key while an agent debugs it

This is the leak we saw most. In our tests, Claude Code (Sonnet 5.5) and Codex (GPT-6 Sol) debugged small apps whose own output contains their fake keys: a crash log that prints the config, a request URL with the key in it, a setup script that prints the environment. With the keys in a .env, a key reached the agent in 41 of 42 runs, with or without instructions and deny rules, and a curl -v in a script leaked in 6 of 6. Neither agent repeated a key in its answer, but the key was in the model's context and, in the Mac runs where we kept the logs, in the agent's session log on disk. Opening the .env leaked less, but it leaked too: both agents opened it when nothing told them not to and tried to show only the names, and Claude's own look at the file still exposed a value in 6 of 27 runs, mostly a database URL its redaction missed. Four of six other models we ran inside Claude Code read the values in almost every run, unless deny rules and two lines of instructions kept them out.

What masking does

When Claude Code or Codex runs a command through accio and the output goes to a pipe or a file (how agents read it), a key in the output is replaced with <concealed by fidelius: NAME> before the agent reads it, and accio says it did. In 54 Claude Code and Codex runs on the same kinds of programs through accio, no key reached the agent: masking replaced keys in 47, and in the other 7 nothing printed one. It also catches the value itself in base64, hex, URL and JSON escaping. We've confirmed agent detection with Claude Code and codex exec. Other agents can set FIDELIUS_MASK=1. What agents see

Losing a key

Deleted keys go to Recently Deleted until you remove them. Backups, when you turn them on, are encrypted with a key derived from a password only you know. Before fidelius changes one of your files, such as an agent's instructions file, it shows you the change, and you can undo it later.

What it doesn't protect against

An agent that decides to get a value

Running a command with accio doesn't ask for Touch ID. Touch ID (or your Mac password) guards Reveal, Copy and Export .env in the app, but any program running as you can run accio, agents included. An agent that ignores its instructions can pass --no-mask, unset the marker that tells accio an agent is running, run accio under a pseudo-terminal, write a value to a file and read it back, or send it over the network from inside the command without printing it. Treat accio access like shell access to your keys. What stops a rogue command is your agent's own permission settings: keep approval on for commands that pass --no-mask, print the environment or send data out.

What masking misses

Masking catches accidents, like a test printing a key. Instructions rarely stopped those in our tests: with them, the key still reached the agent in 5 of 6 runs. Masking stopped it.

Everything the command starts

accio myproject cmd gives every key in that project to the command and to everything it starts: npm scripts, dependencies, child processes, an error tracker that records the environment. Split keys into separate projects when a command doesn't need all of them.

Other programs running as you

Other apps can't read fidelius's Keychain items directly: macOS limits them to apps from the same developer. But any program running as you can run accio and get a project's keys in its environment. Keys are readable once your Mac has been unlocked after a restart, so accio keeps working while the screen is locked.

Things it isn't for

Where your keys go

Compared with other ways

Where the key sitsYour program prints a key while an agent runs itAn agent that tries to get a value
.env filePlain-text fileThe agent sees itReads the file
.env plus instructions, deny rules and ignore filesPlain-text fileThe agent sees it (in our tests, 5 of 6 runs)Can read it with commands Claude Code's docs say the deny rules don't cover, like grep -r, unless the shell is sandboxed
1Password op run1Password vaultMasked by defaultCan run op with --no-masking, after you authorize the session (Touch ID, Apple Watch or your password) if it isn't already authorized
dotenvxEncrypted file, key in your keychain by defaultMasked with --redact or an Envfile settingGets it once a decrypt is allowed; Armor can require approval for each one
fideliusYour KeychainMasked when Claude Code or Codex runs accio, best effortCan run accio with --no-mask, with no prompt

If you already pay for 1Password, op run is a good answer, and its session approval is something fidelius doesn't have. fidelius is $24 once with no account, keeps keys in iCloud Keychain, and sets up Claude Code, Codex and Gemini CLI for you.

Found a problem?

Please don't open a public issue. Use private vulnerability reporting on GitHub, or write to maria@blisslabs.dev.