v2.1.85
📝 概要
フック機能の条件分岐、MCP OAuth対応の強化、大規模セッションのパフォーマンス改善が中心のアップデート
🔄 主な変更点
- フック機能強化:
ifフィールドを使った条件分岐が可能に(例:Bash(git *))でプロセス起動のオーバーヘッドを削減 - MCP機能拡張: 複数サーバー対応のための環境変数追加、RFC 9728準拠のOAuth対応
- パフォーマンス改善: 大規模リポジトリでの@メンション補完の高速化、WASMからTypeScriptへの移行によるスクロール改善
- 組織ポリシー対応:
managed-settings.jsonでブロックされたプラグインのインストール・有効化を防止 - 多数のバグ修正:
/compactの失敗、マルチモニター環境でのswitch_display、メモリリーク、キーボード入力の問題など
💡 解説・活用案
条件分岐フック機能により、特定のコマンド(例: git関連操作のみ)でフックを実行できるようになり、無駄なプロセス起動を削減できます。また、PreToolUseフックでupdatedInputを返すことで、独自UIでユーザー入力を収集するヘッドレス統合が可能になりました。大規模プロジェクトでの動作が全体的に高速化されているため、より快適な開発体験が期待できます。
🌐 日本語訳
主な変更点
- MCPの
headersHelperスクリプトにCLAUDE_CODE_MCP_SERVER_NAMEとCLAUDE_CODE_MCP_SERVER_URL環境変数を追加し、1つのヘルパーで複数のサーバーに対応可能に - パーミッションルール構文(例:
Bash(git *))を使ったフックの条件分岐ifフィールドを追加し、実行タイミングをフィルタリングすることでプロセス起動のオーバーヘッドを削減 - スケジュールタスク(
/loop、CronCreate)が実行された際にトランスクリプトにタイムスタンプマーカーを追加 - 画像貼り付け時の
[Image #N]プレースホルダーの後に末尾スペースを追加 - ディープリンククエリ(
claude-cli://open?q=…)が最大5,000文字まで対応し、長い事前入力プロンプトには「スクロールして確認」警告を表示 - MCP OAuthがRFC 9728 Protected Resource Metadataディスカバリーに従って認証サーバーを検出するように変更
- 組織ポリシー(
managed-settings.json)でブロックされたプラグインはインストール・有効化ができなくなり、マーケットプレイスビューからも非表示に - PreToolUseフックが
permissionDecision: "allow"と共にupdatedInputを返すことでAskUserQuestionを満たせるようになり、独自UIで回答を収集するヘッドレス統合が可能に - OpenTelemetry tool_resultイベントの
tool_parametersがOTEL_LOG_TOOL_DETAILS=1で制御されるように変更 - 会話が大きくなりすぎてコンパクト化リクエスト自体が収まらない場合に
/compactが「context exceeded」で失敗する問題を修正 - プラグインのインストール場所が設定で宣言された場所と異なる場合に
/plugin enableと/plugin disableが失敗する問題を修正 --worktreeがgitリポジトリ以外でWorktreeCreateフックが実行される前にエラーで終了する問題を修正deniedMcpServers設定がclaude.ai MCPサーバーをブロックしない問題を修正- マルチモニター環境でcomputer-useツールの
switch_displayが「このセッションでは利用不可」を返す問題を修正 OTEL_LOGS_EXPORTER、OTEL_METRICS_EXPORTER、またはOTEL_TRACES_EXPORTERがnoneに設定されている場合のクラッシュを修正- 非ネイティブビルドでdiff構文ハイライトが機能しない問題を修正
- リフレッシュトークンが存在する場合にMCPステップアップ認証が失敗する問題を修正 —
403 insufficient_scope経由で昇格スコープを要求するサーバーが正しく再認証フローをトリガーするように修正 - ストリーミングレスポンスが中断された場合のリモートセッションでのメモリリークを修正
- エッジ接続の変動時に持続的なECONNRESETエラーが発生する問題を、リトライ時に新しいTCP接続を使用することで修正
- 特定のスラッシュコマンド実行後にプロンプトがキューでスタックし、上矢印で取得できなくなる問題を修正
- Python Agent SDK:
--mcp-config経由で渡されるtype:'sdk'MCPサーバーが起動時にドロップされる問題を修正 - SSHやVS Code統合ターミナルで実行時にプロンプトに生のキーシーケンスが表示される問題を修正
- Remote Controlセッションステータスがパーミッション解決後も「アクション必要」のままになる問題を修正
- shift+enterとmeta+enterが改行の挿入ではなく先行入力サジェストにインターセプトされる問題を修正
- ストリーミング中にスクロールアップすると古いコンテンツが表示される問題を修正
- Ghostty、Kitty、WezTermなどKittyキーボードプロトコルをサポートするターミナルで終了後に拡張キーボードモードのままになる問題を修正 — 終了後にCtrl+CとCtrl+Dが正しく動作するように修正
- 大規模リポジトリでの@メンションファイル自動補完のパフォーマンスを改善
- PowerShellの危険なコマンド検出を改善
- WASMのyoga-layoutを純粋なTypeScript実装に置き換え、大規模トランスクリプトでのスクロールパフォーマンスを改善
- 大規模セッションでコンパクト化がトリガーされた際のUI停止を軽減
原文(英語)を表示
What's changed
- Added
CLAUDE_CODE_MCP_SERVER_NAMEandCLAUDE_CODE_MCP_SERVER_URLenvironment variables to MCPheadersHelperscripts, allowing one helper to serve multiple servers - Added conditional
iffield for hooks using permission rule syntax (e.g.,Bash(git *)) to filter when they run, reducing process spawning overhead - Added timestamp markers in transcripts when scheduled tasks (
/loop,CronCreate) fire - Added trailing space after
[Image #N]placeholder when pasting images - Deep link queries (
claude-cli://open?q=…) now support up to 5,000 characters, with a "scroll to review" warning for long pre-filled prompts - MCP OAuth now follows RFC 9728 Protected Resource Metadata discovery to find the authorization server
- Plugins blocked by organization policy (
managed-settings.json) can no longer be installed or enabled, and are hidden from marketplace views - PreToolUse hooks can now satisfy
AskUserQuestionby returningupdatedInputalongsidepermissionDecision: "allow", enabling headless integrations that collect answers via their own UI tool_parametersin OpenTelemetry tool_result events are now gated behindOTEL_LOG_TOOL_DETAILS=1- Fixed
/compactfailing with "context exceeded" when the conversation has grown too large for the compact request itself to fit - Fixed
/plugin enableand/plugin disablefailing when a plugin's install location differs from where it's declared in settings - Fixed
--worktreeexiting with an error in non-git repositories before theWorktreeCreatehook could run - Fixed
deniedMcpServerssetting not blocking claude.ai MCP servers - Fixed
switch_displayin the computer-use tool returning "not available in this session" on multi-monitor setups - Fixed crash when
OTEL_LOGS_EXPORTER,OTEL_METRICS_EXPORTER, orOTEL_TRACES_EXPORTERis set tonone - Fixed diff syntax highlighting not working in non-native builds
- Fixed MCP step-up authorization failing when a refresh token exists — servers requesting elevated scopes via
403 insufficient_scopenow correctly trigger the re-authorization flow - Fixed memory leak in remote sessions when a streaming response is interrupted
- Fixed persistent ECONNRESET errors during edge connection churn by using a fresh TCP connection on retry
- Fixed prompts getting stuck in the queue after running certain slash commands, with up-arrow unable to retrieve them
- Fixed Python Agent SDK:
type:'sdk'MCP servers passed via--mcp-configare no longer dropped during startup - Fixed raw key sequences appearing in the prompt when running over SSH or in the VS Code integrated terminal
- Fixed Remote Control session status staying stuck on "Requires Action" after a permission is resolved
- Fixed shift+enter and meta+enter being intercepted by typeahead suggestions instead of inserting newlines
- Fixed stale content bleeding through when scrolling up during streaming
- Fixed terminal left in enhanced keyboard mode after exit in Ghostty, Kitty, WezTerm, and other terminals supporting the Kitty keyboard protocol — Ctrl+C and Ctrl+D now work correctly after quitting
- Improved @-mention file autocomplete performance on large repositories
- Improved PowerShell dangerous command detection
- Improved scroll performance with large transcripts by replacing WASM yoga-layout with a pure TypeScript implementation
- Reduced UI stutter when compaction triggers on large sessions