Policies and hooks
Policy rules in ~/.gemini/policies/ allow, deny or ask about each tool call, and the highest-priority matching rule wins (Gemini CLI docs). Deny recursive deletes and sudo, ask before pushes, publishing and network commands, and never allow run_shell_command without a narrow commandPrefix. Project-level policies aren’t enforced yet, so keep yours in your home folder.
Hooks run commands on events such as SessionStart and BeforeTool. Read every hook, including those extensions add, and never keep one that downloads code.
The policy rules are in the audit’s fix section.