Flag Dev Tools That Run Code on Open
Warns on an agent's file writes and at turn end.
Acts on
File write · Turn end
When
Before the file write · at turn end
Tested
50 of 50 pass
In a git repo
Advisory
What it does
Warns only (observe): flags files that make a dev tool run code on open, clone or shell entry -- agent hooks, helpers, env/BASE_URL overrides, auto-approve; VS Code folderOpen tasks, trust off, repo executables; devcontainer initializeCommand; .envrc, mise, husky, lefthook, pre-commit; gitconfig exec keys, gitattributes drivers, unsafe .gitmodules. Commit, agent write, turn's end; additions only; unreadable configs refused. Friction: misses interpreted code and unlisted files.
Chock adds friction. It is not a security boundary.
Its label on each agent
The catalog grades each policy on each agent. Pick an agent to build with this policy:
- Claude Code TestedWarns Warns on an agent's file writes and at turn endBuild →
- Cursor TestedWarns Warns on an agent's file writes and at turn endBuild →
- Codex TestedWarns Warns on an agent's file writes and at turn end. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run)Build →
- GitHub Copilot TestedWarns Warns at turn end only. It does not check a file write when it happens. If the hook errors, the action goes through (not witnessed; the vendor's row is only partly live-run)Build →
- Devin TestedWarns Warns at turn end only. It does not check a file write when it happens. If the hook errors, the action goes through (vendor docs only, not witnessed)Build →
- Grok Tested Not graded yet for GrokBuild →
- goose Tested Not graded yet for gooseBuild →
- Antigravity Tested Not graded yet for AntigravityBuild →
- OpenHands Untested Not graded yet for OpenHandsBuild →
- Kimi Code Untested Not graded yet for Kimi CodeBuild →
- Factory Droid Untested Not graded yet for Factory DroidBuild →
See it in action
Warns
A change adds a SessionStart hook command to the project's agent settings.
Allowed
An existing agent hook stays as it is while another setting changes.
Both examples are this policy's own test cases.
What it misses
This policy does not state what it misses.
Latest change
0.0.3 · · Title wording only (IR-F40): "Agent Devenv Autoexec" is now "Flag Dev Tools That Run Code on Open". The id, guard and tests are unchanged.