Permissions & Safety
Use this guide to set a safe default before broad rollout.
Permission modes
Section titled “Permission modes”Open Agent SDK supports these permission modes:
defaultacceptEditsbypassPermissionsplan
Start with default for most production traffic.
Only use bypassPermissions for trusted automation contexts where safety controls are handled externally.
Recommended rollout path
Section titled “Recommended rollout path”- Start with
permissionMode: 'default' - Add a typed
canUseToolcallback for allow/deny policy - Audit sensitive tools (
Bash, write/edit actions, network calls) - Gate high-risk actions with explicit approval or environment checks
Policy patterns
Section titled “Policy patterns”Good patterns:
- deny shell execution in untrusted user contexts
- allow read-only tools broadly
- restrict write and network tools by environment or tenant
- log denied actions for policy tuning
Validation checklist
Section titled “Validation checklist”- One happy-path tool execution flow
- One denied sensitive tool flow
- One resumed session with same policy behavior
- One forked session preserving safety constraints