This release resolves all remaining parity gaps identified in the
gap analysis against Python SDK v0.1.18, focusing on protocol
correctness, defensive parsing, and transport reliability.
Protocol Parity (Control Protocol):
- MCP routing: resources/list and prompts/list now return JSON-RPC
method-not-found errors instead of empty success responses (G-014)
- Tool call errors return result payloads with is_error flag instead
of JSONRPC error objects, matching Python SDK behavior (G-012)
- Hook timeout values serialized as seconds in CLI initialization
payload rather than milliseconds (G-002)
- Permission callback responses use camelCase field names (updatedInput,
updatedPermissions) matching Python SDK wire format (G-001)
- can_use_tool auto-sets permission_prompt_tool to "stdio" and validates
mutual exclusivity with explicit permission_prompt_tool (G-003)
Defensive Parsing and Safety:
- Enforce max_buffer_size hard limit (default 1MB) across Port, Erlexec,
and sync process parsing; overflow yields CLIJSONDecodeError (G-011)
- Unknown message types and subtypes preserved as strings rather than
converted to atoms, preventing atom table exhaustion (G-016)
- Tool registry normalizes all tool names to strings internally,
eliminating atom leak vectors from MCP tool routing (G-015)
- Unsupported hook events (session_start, session_end, notification)
rejected during validation for Python SDK parity (G-020)
Query and Streaming API Enhancements:
- Support Enumerable prompts for unidirectional streaming input (G-008)
- Custom transport injection via query/3 third argument
- Client.receive_response_stream/1 provides streaming alternative to
receive_response/1 for progressive message consumption (G-022)
- CLI path overrides honored via path_to_claude_code_executable and
executable options fields (G-004)
- stderr callback wired through Process, Client, and Streaming flows
for non-JSON stderr line handling (G-010)
Configuration and Options:
- mcp_servers accepts JSON string or file path as alias for mcp_config,
matching Python SDK flexibility (G-017)
- Boolean extra_args values follow Python semantics: true emits flag
only, false omits flag entirely (G-018)
- create_sdk_mcp_server defaults version to "1.0.0" when omitted (G-019)
- SDK enforces stream-json output format for transport parsing while
preserving json-schema passthrough (G-006)
- replay-user-messages flag now opt-in via extra_args rather than
always included
Internal Refactoring:
- New CLIStream module handles CLI-only query streaming with transport
abstraction
- ClientStream updated to support streaming prompts and transport
injection
- Options.to_stream_json_args/1 extracts transport-safe argument list
- CLI.resolve_executable/1 consolidates executable resolution with
option overrides
Documentation:
- Updated README, guides, and parity matrix reflecting v0.7.2 status
- Added notes on hook event restrictions, buffer limits, and MCP
routing limitations
- Examples updated for string tool names and streaming patterns