
Your agent can use the key. It never sees it.
Agents can read your .env file like any other file. Phantom Secrets swaps real keys for placeholders and adds the real one only when a request leaves.
The field note
Your .env file holds the keys to your payment provider, your database and your AI accounts. An AI coding agent working in that folder can open the file the same way it opens any other file. Once a key is in the agent's context, it can show up in logs, in a chat history or in a prompt-injection attack.
Phantom Secrets takes a different path. When you run phantom init, it replaces each real value in your project with a placeholder that starts with phm_. The real keys move into your operating system's keychain (or an encrypted file if there is no keychain). Your project, and your agent, only ever see placeholders.




