Skip to content

Commit 30c72e2

Browse files
committed
Add auto to PermissionMode type
1 parent 13f65c8 commit 30c72e2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/claude_agent_sdk/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# Permission modes
2424
PermissionMode = Literal[
25-
"default", "acceptEdits", "plan", "bypassPermissions", "dontAsk"
25+
"default", "acceptEdits", "plan", "bypassPermissions", "dontAsk", "auto"
2626
]
2727

2828
# SDK Beta features - see https://docs.anthropic.com/en/api/beta-headers

tests/test_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ def test_claude_code_options_with_permission_mode(self):
118118
options_dont_ask = ClaudeAgentOptions(permission_mode="dontAsk")
119119
assert options_dont_ask.permission_mode == "dontAsk"
120120

121+
options_auto = ClaudeAgentOptions(permission_mode="auto")
122+
assert options_auto.permission_mode == "auto"
123+
121124
def test_claude_code_options_with_system_prompt_string(self):
122125
"""Test Options with system prompt as string."""
123126
options = ClaudeAgentOptions(

0 commit comments

Comments
 (0)