Skip to content
Closed
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
2 changes: 2 additions & 0 deletions src/claude_agent_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
MirrorErrorMessage,
NotificationHookInput,
NotificationHookSpecificOutput,
EffortLevel,
PermissionMode,
PermissionRequestHookInput,
PermissionRequestHookSpecificOutput,
Expand Down Expand Up @@ -527,6 +528,7 @@ async def call_tool(name: str, arguments: dict[str, Any]) -> Any:
"Transport",
"ClaudeSDKClient",
# Types
"EffortLevel",
"PermissionMode",
"McpServerConfig",
"McpSdkServerConfig",
Expand Down
7 changes: 5 additions & 2 deletions src/claude_agent_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"default", "acceptEdits", "plan", "bypassPermissions", "dontAsk", "auto"
]

# Effort levels — controls how much reasoning Claude applies
EffortLevel = Literal["low", "medium", "high", "xhigh", "max"]

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

Expand Down Expand Up @@ -96,7 +99,7 @@ class AgentDefinition:
initialPrompt: str | None = None # noqa: N815
maxTurns: int | None = None # noqa: N815
background: bool | None = None
effort: Literal["low", "medium", "high", "xhigh", "max"] | int | None = None
effort: EffortLevel | int | None = None
permissionMode: PermissionMode | None = None # noqa: N815


Expand Down Expand Up @@ -1864,7 +1867,7 @@ class ClaudeAgentOptions:
See https://docs.anthropic.com/en/docs/build-with-claude/adaptive-thinking.
"""

effort: Literal["low", "medium", "high", "xhigh", "max"] | None = None
effort: EffortLevel | None = None
"""Controls how much effort Claude puts into its response.

Works with adaptive thinking to guide thinking depth.
Expand Down