git push, no checkout or reset of a protected branch (main, master, dev, …), no bypassing git hooks, no gh and no writes to GitHub; a readOnly session also may not edit files or change the repository. A refused call goes back to the agent with the reason.
MCP tools pass it too: a server’s tools run only when its entry lists them in allowTools (by the names the server gives them; Claude Code writes a server’s name with _ for characters such as ., and the guard matches them as it does), and any other MCP tool is refused, so a server that can write somewhere (a GitHub server, say) cannot post past the guard. A turn’s report tools always run. The bot lists its own servers’ tools this way: psychiatrist’s gather for every agent and apply for those that change files, and codegraph’s read tools.
guard adds rules: each is (toolName, input) => reason | undefined, and a call runs only when the guard and every rule let it. A rule can refuse more, never allow what the guard refuses.