Set the Mode
Set the mode viaAgentState.permission_context when creating the agent, or update it at runtime:
Decision Flow per Mode
Every mode walks the decision points summarized in the decision matrix; the flowcharts below expand each mode into its full decision flow. ASK outcomes trigger user confirmation; if the user accepts the auto-generated suggested rule, it is persisted for future calls.- DEFAULT
- EXPLORE
- ACCEPT_EDITS
- BYPASS
- DONT_ASK
Deny rules and explicit ask rules are always honored, in every mode (including
BYPASS).Tool-emitted safety ASKs (bypass_immune=True) are honored in DEFAULT, ACCEPT_EDITS, and DONT_ASK; they cannot be silenced by allow rules. In BYPASS mode they are skipped on purpose: BYPASS’s contract is “the user has opted out of safety prompts; only deny/ask rules remain as guardrails.” See the safety check contract.