Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/claude_agent_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
# Runtime placeholder for forward reference resolution in Pydantic 2.12+
McpServer = Any

# Permission modes
PermissionMode = Literal[
"default", "acceptEdits", "plan", "bypassPermissions", "dontAsk"
"default", "acceptEdits", "plan", "bypassPermissions", "dontAsk", "auto"
]

Check warning on line 26 in src/claude_agent_sdk/types.py

View check run for this annotation

Claude / Claude Code Review

Docstrings not updated to include 'auto' permission mode

The PR adds 'auto' to PermissionMode in types.py but two docstrings that explicitly enumerate valid permission modes were not updated. Users consulting the docstrings in query.py (lines 55–60) or client.py's set_permission_mode() (lines 249–254) will not find 'auto' listed, creating a documentation/type mismatch. Add '- "auto": Automatically determine permission mode' to both docstring bullet lists.
Comment thread
claude[bot] marked this conversation as resolved.

# SDK Beta features - see https://docs.anthropic.com/en/api/beta-headers
SdkBeta = Literal["context-1m-2025-08-07"]
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