mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
feat: add timeout and max_turns parameters to AgentDefinition
Add timeout (in seconds) and max_turns parameters to AgentDefinition to allow configuring subagent execution limits. This prevents subagents from hanging indefinitely and enables better control over agent behavior.
This commit is contained in:
parent
ccff8ddf48
commit
956c8f7403
1 changed files with 2 additions and 0 deletions
|
|
@ -47,6 +47,8 @@ class AgentDefinition:
|
|||
prompt: str
|
||||
tools: list[str] | None = None
|
||||
model: Literal["sonnet", "opus", "haiku", "inherit"] | None = None
|
||||
timeout: float | None = None # Timeout in seconds for subagent execution
|
||||
max_turns: int | None = None # Maximum turns for this agent
|
||||
|
||||
|
||||
# Permission Update types (matching TypeScript SDK)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue