mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
Fixes #1063 When a permission callback returns `PermissionResultAllow()` without the `updated_input` parameter, the SDK should not include `updatedInput` in the control_response. Previously, the SDK always included this field, either with the modified input or falling back to the original input, which caused MCP tools to receive empty {} arguments instead of Claude's original arguments. Changes: - Modified query.py to only include updatedInput when explicitly set - Added regression test to verify updatedInput is omitted when not provided - Existing test for input modification still passes Before this fix: ```json { "behavior": "allow", "updatedInput": {} // Bug: Always included even when not set } ``` After this fix: ```json { "behavior": "allow" // updatedInput only included when explicitly provided } ``` |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| test_changelog.py | ||
| test_client.py | ||
| test_errors.py | ||
| test_integration.py | ||
| test_message_parser.py | ||
| test_sdk_mcp_integration.py | ||
| test_streaming_client.py | ||
| test_subprocess_buffering.py | ||
| test_tool_callbacks.py | ||
| test_transport.py | ||
| test_types.py | ||