Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/claude_agent_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ async def set_permission_mode(self, mode: PermissionMode) -> None:
- 'plan': Plan-only mode (no tool execution)
- 'bypassPermissions': Allow all tools (use with caution)
- 'dontAsk': Allow all tools without prompting
- 'auto': Automatically determine permission mode

Example:
```python
Expand Down
1 change: 1 addition & 0 deletions src/claude_agent_sdk/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ async def query(
- 'plan': Plan-only mode (no tool execution)
- 'bypassPermissions': Allow all tools (use with caution)
- 'dontAsk': Allow all tools without prompting
- 'auto': Automatically determine permission mode
Set options.cwd for working directory.
transport: Optional transport implementation. If provided, this will be used
instead of the default transport selection based on options.
Expand Down
2 changes: 1 addition & 1 deletion src/claude_agent_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Permission modes
PermissionMode = Literal[
"default", "acceptEdits", "plan", "bypassPermissions", "dontAsk"
"default", "acceptEdits", "plan", "bypassPermissions", "dontAsk", "auto"
]
Comment thread
claude[bot] marked this conversation as resolved.

# SDK Beta features - see https://docs.anthropic.com/en/api/beta-headers
Expand Down
3 changes: 3 additions & 0 deletions tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ def test_claude_code_options_with_permission_mode(self):
options_dont_ask = ClaudeAgentOptions(permission_mode="dontAsk")
assert options_dont_ask.permission_mode == "dontAsk"

options_auto = ClaudeAgentOptions(permission_mode="auto")
assert options_auto.permission_mode == "auto"

def test_claude_code_options_with_system_prompt_string(self):
"""Test Options with system prompt as string."""
options = ClaudeAgentOptions(
Expand Down
Loading