Claude Code sdk
ComponentUpdates related to the sdk component of Claude Code.
All SDK Features
- Added `auto:N` syntax for configuring the MCP tool search auto-enable threshold based on context window percentage (0-100).(v2.1.9)
- Added `plansDirectory` setting to customize the storage location for plan files.(v2.1.9)
- Enabled external editor support (Ctrl+G) within the AskUserQuestion "Other" input field.(v2.1.9)
- Added session URL attribution to commits and PRs generated from web sessions.(v2.1.9)
- Added support for `PreToolUse` hooks to return `additionalContext` to the model.(v2.1.9)
- Added `${CLAUDE_SESSION_ID}` string substitution for skills to access the current session ID.(v2.1.9)
- Added `showTurnDuration` setting to allow users to hide turn duration messages in the output.(v2.1.7)
- Enabled MCP tool search auto mode by default, deferring tool descriptions that exceed 10% of the context window to reduce upfront context usage.(v2.1.7)
- Added source path metadata to images dragged onto the terminal to help Claude understand image origins(v2.1.2)
- Added clickable hyperlinks for file paths in tool output in terminals that support OSC 8 (like iTerm)(v2.1.2)
- Added support for Windows Package Manager (winget) installations with automatic detection and update instructions(v2.1.2)
- Added Shift+Tab keyboard shortcut in plan mode to quickly select "auto-accept edits" option(v2.1.2)
- Added FORCE_AUTOUPDATE_PLUGINS environment variable to allow plugin autoupdate even when the main auto-updater is disabled(v2.1.2)
- Added agent_type to SessionStart hook input, populated if --agent is specified(v2.1.2)
All SDK Bug Fixes
- Fixed API errors related to orphan tool_result blocks occurring during long sessions with parallel tool calls.(v2.1.9)
- Fixed MCP server reconnection hanging when the cached connection promise fails to resolve.(v2.1.9)
- Fixed Ctrl+Z suspend functionality not working in terminals utilizing the Kitty keyboard protocol (including Ghostty, iTerm2, kitty, and WezTerm).(v2.1.9)
- Fixed a security vulnerability where wildcard permission rules could incorrectly match compound commands containing shell operators.(v2.1.7)
- Fixed false "file modified" errors occurring on Windows due to cloud sync tools or antivirus scanners touching file timestamps without content changes.(v2.1.7)
- Fixed orphaned `tool_result` errors when sibling tools failed during streaming execution.(v2.1.7)
- Fixed context window blocking limit calculation to use the effective context window (reserving space for max output tokens) instead of the full context window.(v2.1.7)
- Fixed a visual glitch where the spinner briefly flashed when running local slash commands like `/model` or `/theme`.(v2.1.7)
- Fixed terminal title animation jitter by utilizing fixed-width braille characters.(v2.1.7)
- Fixed plugins with git submodules not being fully initialized upon installation.(v2.1.7)
- Fixed bash commands failing on Windows when temporary directory paths contained characters like `t` or `n` that were misinterpreted as escape sequences.(v2.1.7)
- [VSCode] Fixed an issue where the `claudeProcessWrapper` setting was incorrectly passing the wrapper path instead of the Claude binary path.(v2.1.7)
- Fixed a command injection vulnerability in bash command processing where malformed input could execute arbitrary commands(v2.1.2)
- Fixed a memory leak where tree-sitter parse trees were not being freed, causing WASM memory to grow unbounded over long sessions(v2.1.2)
- Fixed binary files (images, PDFs, etc.) being accidentally included in memory when using @include directives in CLAUDE.md files(v2.1.2)
- Fixed updates incorrectly claiming another installation is in progress(v2.1.2)
- Fixed crash when socket files exist in watched directories(v2.1.2)
- Fixed remote session URL and teleport being broken when using /tasks command(v2.1.2)
- Fixed MCP tool names being exposed in analytics events by sanitizing user-specific server configurations(v2.1.2)
- Fixed usage display not updating after manual compact in VSCode(v2.1.2)
Releases with SDK Changes
v2.1.96 features3 fixesThis release introduces several new configuration and integration capabilities, including customizable plan storage and enhanced session context access via new string substitutions. Several critical bugs were resolved, specifically addressing failures in long parallel tool call sessions and improving terminal suspend functionality across various terminal emulators.
v2.1.72 features9 fixesThis release introduces new configuration options, including the ability to hide turn duration messages and an improved default behavior for managing large tool sets via MCP search auto mode. Several critical bugs were fixed, addressing security vulnerabilities, false file modification errors on Windows, and issues related to context window calculation and command execution.
v2.1.26 features8 fixesThis release introduces several new capabilities, including source path metadata for dragged images and support for winget installations. Key fixes address a command injection vulnerability and memory leaks during long sessions. Additionally, large tool outputs are now saved to disk instead of being truncated, ensuring Claude has access to the full content.