Renaming or relocating a repository looks cosmetic. For a coding agent it is a permission change. Agents resolve the path you give them against the working directory and fall back to something permissive when resolution fails. An allowlist written as an absolute path stops matching the moment the checkout moves, and the comparison code usually has an except branch that logs a warning and proceeds. The agent now reads the whole tree instead of one directory, and nothing says "access expanded."
The root cause is delegation. An AI coding agent runs with the privileges of the person who launched it, presenting the same credentials on the same machine, so credential-based controls cannot tell the agent and the human apart. A developer allowed to read a production config file hands that same access to any agent they run (BeyondTrust). That is why the boundary belongs in the tool call: a pre-execution hook or sandboxed file reader that consults a policy at the moment of access.
This is a familiar governance problem in new clothing. Policy drift is the general term for systems, controls and practices moving away from approved expectations, and the canonical example is identity and access policies edited during sprints and hotfixes that end up granting broader access than intended (Sprinto). A repo move is a hotfix to your directory layout. If the access policy does not live in the same file as the layout, it drifts.
There is a second, tool-specific reason to care. Git-ignored is not the same as agent-invisible. Many agents scan the filesystem directly rather than the git index, so .gitignore alone does not stop an agent from reading .env files, lockfiles or vendor folders (Qabash). Your policy must describe the filesystem, not the commit history.



