Claude Code v2.1.163 の更新内容
Claude Code v2.1.16 は、バージョン管理機能の強化、プラグインコマンドの追加、および Bash コマンド実行時の安定性向上を含む重要な修正と新機能をリリースしました。
キーポイント
厳格なバージョン管理機能の導入
管理者が `requiredMinimumVersion` と `requiredMaximumVersion` を設定できるようになり、範囲外のバージョンでは Claude Code が起動しなくなるセキュリティ強化が行われました。
プラグインとショートカットの拡張
インストール済みプラグインの一覧表示コマンド `/plugin list` と、Markdown 形式を保持したままクリップボードにコピーする `c` ショートカットが追加されました。
Bash コマンド実行の安定性向上
バグにより発生していた永久フリーズや権限エラー、Windows 環境でのセッションディレクトリ関連の不具合が修正され、特に背景プロセスの管理が改善されました。
Hooks と Skills の挙動改善
Hook がエラーとみなされない形で追加コンテキストを返せるようになり、コマンド本体での `$` 文字のエスケープ構文も実装されました。
影響分析・編集コメントを表示
影響分析
今回のアップデートは、特にエンタープライズ環境において AI ツールのバージョン管理とセキュリティを強化する重要な一歩です。また、開発者が日常的に遭遇する Bash コマンド実行時のフリーズや権限エラーといった痛烈な不具合が修正されたことで、ツールの実用性と安定性が大幅に向上しました。
編集コメント
バージョン管理機能の追加は、企業導入におけるガバナンス要件への対応として極めて重要です。また、長年の課題であった Bash コマンドのフリーズ問題が解消されたことは、開発者コミュニティにとって大きな朗報です。
変更点
- requiredMinimumVersion および requiredMaximumVersion の管理設定を追加しました。Claude Code は、自身のバージョンが許可された範囲外の場合に起動を拒否し、ユーザーに承認されたバージョンへの更新を案内します。
- インストールされているプラグインの一覧表示コマンドとして /plugin list を追加しました。--enabled/--disabled フィルターも利用可能です。
- /btw コマンドに「c でコピー」ショートカットを追加しました。これにより、生 Markdown 形式の回答がクリップボードにコピーされ、他の場所で貼り付けた際にもフォーマットが保持されます。
- Hooks: Stop および SubagentStop フックは now、hookSpecificOutput.additionalContext を返すことが可能になりました。これにより、Claude にフィードバックを提供し、フックエラーとしてラベル付けされることなくターンを継続できます。
- Skills: コマンド本体内で数字の前に文字通り「$」を含めるために、\$ エスケープ構文を追加しました。
- stdio MCP サーバーは、--resume 指定時に Hooks や Bash と同じ CLAUDE_CODE_SESSION_ID を受け取るようになりました。
- バックグラウンドで実行されたコマンドが終了しない場合、最終結果後に claude -p が永遠に停止する不具合を修正しました。標準入力が閉じられた後、バックグラウンドシェルは約 5 秒後に停止します。
- CI=true で設定され、Anthropic API キーが設定されていない場合に Bedrock/Vertex/Foundry で「ANTHROPIC_API_KEY required」というエラーで claude -p が失敗する不具合を修正しました。
- bazel および EDR 保護下の Go ワークフロー内で Bash コマンドが失敗する不具合を修正しました。2.1.154 版での回帰により、サンドボックス化されたコマンドのみならずすべてのコマンドで $TMPDIR が /tmp/claude-{uid} に上書きされてしまう問題(regression in 2.1.154)を修正しました。
- セッション環境ディレクトリが読み取り専用属性を持っている場合や OneDrive 内に存在する場合に、Windows で Bash コマンドが「EEXIST: file already exists」というエラーで失敗する不具合を修正しました。
- 新規設定ディレクトリでの起動時に管理設定の取得が完了した際に、セッション全体に対して適用されなかった組織管理による権限ルールを修正しました
- Claude Code の更新後に再接続された際、Claude エージェントのバックグラウンドセッションで実行中のバックグラウンドタスクが失われる問題を修正しました
- Esc キーを押してエージェントビューを終了した際に発生するターミナルのアライメント崩れと数秒間の応答停止を修正しました
- デスクトップアプリでバックグラウンドタスクチップの「Stop」をクリックしても、基盤となるプロセスが既に存在しない場合にチップが消去されない問題を修正しました
- ターミナルによって終端マーカーがドロップされた貼り付け操作の後、キーボード入力が永続的に無反応になる問題を修正しました
- "Bash(...)" 条件を持つフックの deny ルールが、$() や $VAR を含むすべての Bash コマンドで発火していた不具合を修正しました。現在はサブシェルやバッククォート内のコマンドにもパターンが一致するようになりました
- ホームディレクトリパスに対する拒否ルール(例:Read(~/Desktop/**))が、$HOME 経由でそのパスを参照する Bash コマンドをブロックしていなかった問題を修正しました
- /mcp や /plugins などのパネルダイアログを閉じた後に、転記(トランスクリプト)内に未処理の「(no content)」行が残っていた問題を修正しました
- バックグラウンドエージェントセッションは、新しい Claude Code バージョンへバックグラウンドで更新されるようになりました。これにより、更新後のセッションを開いてもコールドスタートを待たずに済みます
- /メニュー内の組み込みコマンドとスキルの説明がより明確になりました
- サブスクリプション切り替えの提案表示位置をトーストから、起動時の告知エリアに変更しました
- state-grouped ビューから起動される Claude エージェントは、エージェントビューが開かれたディレクトリをセッションの開始ディレクトリとして使用します now starts the session in the directory the agent view was opened from
原文を表示
What's changed
- Added requiredMinimumVersion and requiredMaximumVersion managed settings — Claude Code refuses to start if its version is outside the allowed range and directs the user to an approved version
- Added /plugin list command to list installed plugins, with --enabled/--disabled filters
- Added a "c to copy" shortcut to /btw that copies the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere
- Hooks: Stop and SubagentStop hooks can now return hookSpecificOutput.additionalContext to give Claude feedback and keep the turn going without being labeled a hook error
- Skills: added \$ escape syntax to include a literal $ before a digit in command bodies
- stdio MCP servers now receive the same CLAUDE_CODE_SESSION_ID as hooks/Bash on --resume
- Fixed claude -p hanging forever after its final result when a backgrounded command never exits — background shells are now stopped ~5s after the result once stdin closes
- Fixed claude -p failing with "ANTHROPIC_API_KEY required" on Bedrock/Vertex/Foundry when CI=true and no Anthropic API key is set
- Fixed bash commands failing under bazel and EDR-protected Go workflows: $TMPDIR was overridden to /tmp/claude-{uid} for all commands instead of only sandboxed ones (regression in 2.1.154)
- Fixed Bash commands failing on Windows with "EEXIST: file already exists" on the session-env directory when it has the read-only attribute or is inside OneDrive
- Fixed org-managed permission rules not applying for the entire session when the managed settings fetch completed during startup on a fresh config directory
- Fixed background sessions in claude agents losing their running background tasks when reattached after a Claude Code update
- Fixed terminal misalignment and a multi-second hang when exiting the agent view by pressing Esc
- Fixed clicking Stop on a background-task chip in the desktop app not clearing the chip when the underlying process was already gone
- Fixed keyboard input becoming permanently unresponsive after a paste operation whose end marker is dropped by the terminal
- Fixed hook if: "Bash(...)" conditions firing on every Bash command containing $() or $VAR; the pattern now matches against commands inside subshells and backticks too
- Fixed deny rules on home-directory paths (e.g. Read(~/Desktop/**)) not blocking Bash commands that reference the path via $HOME
- Fixed a stray "(no content)" line left in the transcript after closing panel dialogs like /mcp and /plugins
- Background agent sessions now update to a new Claude Code version in the background, so opening a session after an update no longer waits on a cold restart
- Clearer descriptions for built-in commands and skills in the / menu
- The subscription-switch suggestion now shows in the startup announcement slot instead of a toast
- claude agents dispatching from the state-grouped view now starts the session in the directory the agent view was opened from
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み