Claude Code Changelog·2026年4月22日 09:04·約5分
v2.1.117
TL;DR
開発チームは、環境変数でフォークサブエージェントを有効化しMCPサーバー設定をロードする機能を追加した。/modelコマンドの選択結果を再起動後も保持し、起動画面でモデル情報を表示するよう改善した。
変更内容
- 外部ビルドにおいて、CLAUDE_CODE_FORK_SUBAGENT=1 を設定することで、フォークされたサブエージェントを有効にできるようになりました
- --agent オプションによるメインスレッドのエージェントセッションにおいて、エージェントのフロントマターにある mcpServers が読み込まれるようになりました
- /model の選択が、プロジェクトで異なるモデルを固定している場合でも再起動後に保持されるようになり、起動時のヘッダーにアクティブなモデルがプロジェクト由来か管理設定の固定によるものかが表示されるようになりました
- /resume コマンドは、再読み込みする前に古く large なセッションの要約を提供するようになり、既存の --resume の動作と一致しました
- ローカルおよび claude.ai の MCP サーバーの両方が設定されている場合、起動速度が向上しました(並列接続がデフォルトになりました)
- 既にインストールされているプラグインに対する plugin install は、「すでにインストール済み」で停止するのではなく、不足している依存関係のインストールを行うようになりました
- プラグインの依存関係エラーは「未インストール」と表示され、インストールヒントが付加されるようになりました。また、claude plugin marketplace add は、設定されたマーケットプレイスから不足している依存関係を自動的に解決するようになりました
- 管理設定の blockedMarketplaces および strictKnownMarketplaces が、プラグインのインストール、更新、リフレッシュ、自動更新時に適用されるようになりました
- アドバイザーツール(実験的):有効化された場合、ダイアログには「実験的」ラベル、詳細リンク、起動時の通知が表示されるようになりました。また、すべてのプロンプトおよび /compact 時に「アドバイザーツールの結果コンテンツを処理できませんでした」というエラーでセッションが固まる問題が解決しました
- cleanupPeriodDays による保持期間のスイープは、~/.claude/tasks/、~/.claude/shell-snapshots/、~/.claude/backups/ も対象となりました
- OpenTelemetry: スラッシュコマンドの場合、user_prompt イベントに command_name と command_source が追加されました。cost.usage、token.usage、api_request、および api_error には、モデルが努力レベルをサポートする場合、effort 属性が含まれるようになりました。カスタム/MCP コマンド名は、OTEL_LOG_TOOL_DETAILS=1 が設定されていない限り、マスクされます。
- macOS および Linux でのネイティブビルド: Glob ツールと Grep ツールは、Bash ツールを通じて利用可能な組み込みの bfs と ugrep に置き換えられました。これにより、別のツール呼び出しラウンドトリップなしで高速な検索が可能になります(Windows および npm インストール版のビルドは変更なし)。
- Windows: プロセスごとに where.exe 実行ファイルのキャッシュされた参照を行うようになり、サブプロセスの起動が高速化しました。
- Pro/Max 契約者の Opus 4.6 および Sonnet 4.6 におけるデフォルトの努力レベルは、以前は「中」でしたが、「高」に変更されました。
- 修正: Plain-CLI の OAuth セッションで、アクセストークンがセッション中に期限切れになると「/login を実行してください」というエラーが発生していた問題を修正しました。現在、401 エラー時にトークンが自動的に更新されます。
- 修正: WebFetch が非常に大きな HTML ページでハングする問題を、HTML からマークダウンへの変換前に入力を切り捨てることで修正しました。
- 修正: プロキシが HTTP 204 No Content を返した場合にクラッシュしていた問題を、TypeError の代わりに明確なエラーを表示するよう修正しました。
- 修正: CLAUDE_CODE_OAUTH_TOKEN 環境変数と、そのトークンが期限切れの場合に /login が機能しなかった問題を修正しました。
- 修正: 入力直後に Ctrl+_(元に戻す)が機能せず、各元に戻しステップで状態をスキップしていた問題を修正しました。
- 修正: Bun 実行環境下で、リモート API リクエストに対して NO_PROXY が尊重されていなかった問題を修正しました。
- 修正: 低速な接続環境でキー名が結合されたテキストとして送信される際に、稀に誤ったエスケープ/リターントリガーが発生する問題を修正しました。
- SDKのreload_plugins機能において、すべてのユーザーMCPサーバーが直列で再接続される問題を修正
- 思考機能を無効化したOpus 4.7をバックエンドとする場合、Bedrockのapplication-inference-profileリクエストが400エラーで失敗する問題を修正
- print/SDKモードにおいて、サーバーがターン中に接続を完了した際にMCPのelicitation/createリクエストが自動的にキャンセルされる問題を修正
- メインエージェントとは異なるモデルを実行するサブエージェントが、ファイル読み込みを誤ってマルウェア警告としてフラグ付けする問題を修正
- バックグラウンドタスクが存在する場合のアイドル再描画ループを修正し、Linux上でのメモリ増大を軽減
- [VSCode] 複数の大規模マーケットプレイスが設定されている場合に「Manage Plugins」パネルが破損する問題を修正
- Opus 4.7セッションにおいて、/contextのパーセンテージが過大に表示され、早期に自動コンパクションが行われる問題を修正 — Claude CodeはOpus 4.7のネイティブな1Mコンテキストウィンドウではなく、200Kのコンテキストウィンドウに対して計算を行っていた
原文を表示
What's changed
- Forked subagents can now be enabled on external builds by setting CLAUDE_CODE_FORK_SUBAGENT=1
- Agent frontmatter mcpServers are now loaded for main-thread agent sessions via --agent
- Improved /model: selections now persist across restarts even when the project pins a different model, and the startup header shows when the active model comes from a project or managed-settings pin
- The /resume command now offers to summarize stale, large sessions before re-reading them, matching the existing --resume behavior
- Faster startup when both local and claude.ai MCP servers are configured (concurrent connect now default)
- plugin install on an already-installed plugin now installs any missing dependencies instead of stopping at "already installed"
- Plugin dependency errors now say "not installed" with an install hint, and claude plugin marketplace add now auto-resolves missing dependencies from configured marketplaces
- Managed-settings blockedMarketplaces and strictKnownMarketplaces are now enforced on plugin install, update, refresh, and autoupdate
- Advisor Tool (experimental): dialog now carries an "experimental" label, learn-more link, and startup notification when enabled; sessions no longer get stuck with "Advisor tool result content could not be processed" errors on every prompt and /compact
- The cleanupPeriodDays retention sweep now also covers ~/.claude/tasks/, ~/.claude/shell-snapshots/, and ~/.claude/backups/
- OpenTelemetry: user_prompt events now include command_name and command_source for slash commands; cost.usage, token.usage, api_request, and api_error now include an effort attribute when the model supports effort levels. Custom/MCP command names are redacted unless OTEL_LOG_TOOL_DETAILS=1 is set
- Native builds on macOS and Linux: the Glob and Grep tools are replaced by embedded bfs and ugrep available through the Bash tool — faster searches without a separate tool round-trip (Windows and npm-installed builds unchanged)
- Windows: cached where.exe executable lookups per process for faster subprocess launches
- Default effort for Pro/Max subscribers on Opus 4.6 and Sonnet 4.6 is now high (was medium)
- Fixed Plain-CLI OAuth sessions dying with "Please run /login" when the access token expires mid-session — the token is now refreshed reactively on 401
- Fixed WebFetch hanging on very large HTML pages by truncating input before HTML-to-markdown conversion
- Fixed a crash when a proxy returns HTTP 204 No Content — now surfaces a clear error instead of a TypeError
- Fixed /login having no effect when launched with CLAUDE_CODE_OAUTH_TOKEN env var and that token expires
- Fixed prompt-input undo (Ctrl+_) doing nothing immediately after typing, and skipping a state on each undo step
- Fixed NO_PROXY not being respected for remote API requests when running under Bun
- Fixed rare spurious escape/return triggers when key names arrive as coalesced text over slow connections
- Fixed SDK reload_plugins reconnecting all user MCP servers serially
- Fixed Bedrock application-inference-profile requests failing with 400 when backed by Opus 4.7 with thinking disabled
- Fixed MCP elicitation/create requests auto-cancelling in print/SDK mode when the server finishes connecting mid-turn
- Fixed subagents running a different model than the main agent incorrectly flagging file reads with a malware warning
- Fixed idle re-render loop when background tasks are present, reducing memory growth on Linux
- [VSCode] Fixed "Manage Plugins" panel breaking when multiple large marketplaces are configured
- Fixed Opus 4.7 sessions showing inflated /context percentages and autocompacting too early — Claude Code was computing against a 200K context window instead of Opus 4.7's native 1M
この記事をシェア
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み