Qing Wang
Qing Wang
This should be already supported. I will make sure the docs point to this more clear for Agent SDK specifically. Try passing these through options.env: options = ClaudeAgentOptions( env={ "API_TIMEOUT_MS":...
This has been answered. Tool permission approval is handled via the `can_use_tool` callback in `ClaudeAgentOptions`. See the working example at `examples/tool_permission_callback.py` in this repo. Community members have confirmed this works....
This has been resolved with the addition of the `can_use_tool` callback on `ClaudeAgentOptions` (added in v0.1.29+). This is an async callback that gives you full programmatic control over permission decisions...
You can disable specific MCP tools using the `disallowed_tools` option with the fully-qualified tool name (`mcp____`): ```python options = ClaudeAgentOptions( mcp_servers={ "xxx-maps": { "url": "https://mcp.map.baidu.com/mcp?ak=xxxxx", "type": "http", } }, disallowed_tools=["mcp__xxx-maps__map_reverse_geocde"],...
This is a duplicate of #501. Both issues stem from the same root cause: `system_prompt` is passed to the CLI as a `--system-prompt` command-line argument via `_build_command()`. Newlines in the...
This is now resolved. As of SDK v0.1.46+, thinking is supported as a first-class parameter on `ClaudeAgentOptions`: ```python from claude_agent_sdk.types import ThinkingConfigEnabled, ThinkingConfigAdaptive # Adaptive thinking (recommended) options = ClaudeAgentOptions(...
This has been resolved. PR #685 (`fc82420`, merged in v0.1.49) added the `usage` field to `AssistantMessage`, which now captures per-turn usage statistics from the CLI output. You can access per-step...
Partial update: as of v0.1.46 (PR #628, merged March 3, 2026), `agent_id` and `agent_type` are now available on tool-lifecycle hook inputs: - `PreToolUseHookInput` - `PostToolUseHookInput` - `PostToolUseFailureHookInput` - `PermissionRequestHookInput` These...
Closing — based on the thorough investigation in the comments, this is working as intended. Sessions cannot escalate to `bypassPermissions` after starting with a lower permission level. This is a...
This is tracked by #457, which proposes a first-class `sandbox_path` option to restrict all file operations (Read, Write, Edit, and Bash) to a designated workspace directory. That issue has a...