Skip to content
BENIBIX Learn

permissionMode Option

Also known as permissionMode, permission_mode, Agent SDK permission mode, Claude Agent SDK permissionMode

The option that sets the mode for what needs a yes.

Think of it like

It is like how much a new helper may do on their own.

Example

Leo's agent runs in a test box in CI that is thrown away after. He uses bypass mode there, and default mode on his laptop.

Why it matters

The same agent needs a tight leash on a laptop and a loose one in a sandbox.

Definition

permissionMode is the Agent SDK option that sets how much the agent may do with no approval. In Python it is permission_mode. In default mode, calls that need approval go to your canUseTool callback, and with no callback they are denied. acceptEdits lets file edits through. The other modes work as they do in Claude Code. You can change it mid-session.

Common mistake

Using default with no callback and wondering why calls are denied. With no callback, default denies.

Key takeaways

  1. 1
    Picks the mode. Six choices.
  2. 2
    default needs a callback. Or it denies.
  3. 3
    Change it mid-session. setPermissionMode.