I’m running the latest version of the standalone Antigravity IDE (2.5.5) and having trouble getting agents to respect not being able to view/read files listed in .gitignore in root of project workspace. That is, AG isn’t ignoring files listed in .gitignore by default, and I can prompt the agent to read their content. Not only that, but I’m unable to find the ‘Agent Gitignore Access’ setting anymore. Has something recently changed around how to restrict access to ignored files?
Hi @buswedg, welcome to the forum!
In Antigravity 2.5+, “Agent Gitignore Access” checkbox was consolidated into Strict Mode and the Unified Permission Engine (Antigravity Documentation).
To protect your files, please try one of the following methods:
1. Enable “Strict Mode” (Quickest Fix)
- Open Settings (Cmd/Ctrl + ,) or click the gear icon in the Agent panel, then toggle Strict Mode to ON.
2. Use a Persistent Workspace Rule
To ensure privacy rules apply automatically to anyone using the workspace, create a global instruction file.
- update .agents/rules/privacy.md as following as :
always_on: true
3. Surgical Blocking via Deny List
If you need to keep Standard Mode active but want to block specific sensitive files (like .env or credentials) regardless of your git status:
- Update Agent panel > … > Settings > Edit settings.json configuration file as below:
{
"permissions": {
"deny": [
"read_file(.env*)",
"read_file(secrets/)",
"read_file(config/private.json)"
]
}
}
Note: Explicit deny rules always take precedence over general permissions (Deny > Ask > Allow).
"explorer.excludeGitIgnore": true,
This setting, in settings.json, SHIFT-CTRL-P, Preferences: Open User Settings (JSON), does the trick for me, this drops what I have in my .gitignore from the folder view.
Oddly, I haven’t found anything that also reads $HOME/.gitignore, like git does. I had to mechanically translate it over to "files.exclude", slightly irritating…