Your agent reads .env. It can't read a vault.
You give an AI agent a shell in your project. The project has a .env file. The agent can read it. Most advice offers two fixes: an ignore file and deny rules. Both help. Both leave gaps. Here is where, with commands you can try.