Claude Code v2.1.139:エージェント機能とゴールコマンドが追加
Claude Code はエージェント管理機能の導入、ゴール指向の自動化コマンド、および MCP サーバーとの連携強化を含む v2.1.139 をリリースし、開発ワークフローの自律性と制御性を大幅に向上させた。
キーポイント
エージェント管理とゴール指向機能の追加
すべてのセッションを一元管理する「Agent View」の新規導入と、完了条件を設定して継続的に作業を行う `/goal` コマンドが実装され、複雑なタスクの実行が可能になった。
MCP サーバーおよびプラグイン連携の強化
環境変数の標準化や自動再試行機能の追加により、MCP サーバーとの接続安定性が向上し、プラグインの詳細情報表示やインストール処理も改善された。
開発者体験(DX)とデバッグ機能の拡充
スクロール速度のカスタマイズ、トランスクリプトナビゲーションの強化、および API リクエストヘッダーへのエージェント ID 追跡機能により、運用監視と操作感が向上した。
セキュリティと認証フローの厳格化
API キー設定時に特定の機能が自動的に無効化される仕組みや、認証情報のデッドロック解消など、セキュリティリスクの低減と安定動作が図られた。
影響分析・編集コメントを表示
影響分析
今回のアップデートは、Claude Code を単なるチャットインターフェースから、複雑な開発タスクを自律的に完遂できる「エージェント型ツール」へと進化させる重要な転換点です。特にゴール指向機能とエージェント管理の強化により、開発者は高レベルの指示だけで複雑なシステム構築やリファクタリングを任せられるようになり、生産性の飛躍的な向上が期待されます。
編集コメント
「Agent View」や「/goal」機能の導入は、AI エージェントが人間に代わって自律的にタスクを完結させるための基盤整備として極めて重要です。開発現場における AI の役割が「アシスタント」から「実行エージェント」へとシフトする兆候を強く示しています。
変更点
- エージェントビュー(研究用プレビュー)を追加:Claude Code のすべてのセッション(実行中、ユーザー待ち、完了済み)を単一のリストで表示。開始するには
claude agentsを実行してください。詳細は https://code.claude.com/docs/en/agent-view をご覧ください。
/goalコマンドを追加:完了条件を設定し、Claude がその条件が満たされるまでターンを超えて作業を継続します。インタラクティブモード、-pオプション、リモートコントロールで動作します。実行時間・ターン数・トークン数をリアルタイムで表示するオーバーレイパネルも併せて表示されます。
/scroll-speedコマンドを追加:マウスホイールのスクロール速度をライブプレビュー付きで調整可能にしました。
- クラウドプラグインの詳細情報を追加:各プラグインのコンポーネント一覧と、セッションごとの予想トークンコストを表示します。
- 会話履歴ビューのナビゲーション機能を追加:
?でキーボードショートカットを表示、{/}でユーザーのプロンプト間をジャンプ、vでショートカットパネルの表示/非表示を切り替えられます。
- フック引数に
string[]フィールド(exec 形式)を追加:シェルを経由せずにコマンドを直接起動するため、パスプレースホルダーにクォートが必要なくなります。
- PostToolUse のためのフック設定オプション
continueOnBlockを追加:trueに設定すると、フックによる拒否理由を Claude にフィードバックし、そのターンを継続できます。
- MCP stdio サーバーが環境変数
CLAUDE_PROJECT_DIRを受け取るようになりました(フックと同様)。プラグイン設定では、コマンド内で${CLAUDE_PROJECT_DIR}を参照できるようになりました。
- コンパクションプロンプトが、機密性の高いユーザー指示の保持をモデルに求めるように変更されました。
/mcp Reconnectが.mcp.jsonの編集内容を再起動なしで反映するようになり、再接続失敗時には HTTP ステータスと URL を表示します。
/context allによる各スキルごとのトークン見積もりが、モデルのトークナイザーを考慮した値となり、丸められた数値として表示されるようになりました。
- claude プラグインのインストール時に、マーケットプレイスが自動的にリフレッシュされ、プラグインが見つからないと報告される前に再試行が行われるようになりました
- /plugin コマンドでインストールされたプラグインの詳細を表示する際、フックイベント名と MCP サーバー名が明確に表示されるようになりました
- /context コマンドでは、スキルソースとなるプラグインの名前が表示されるようになりました
- 一時的な障害が発生した際のリモート MCP サーバーへの再接続再試行機能が、すべてのユーザーで有効になりました
- サブエージェントからの API リクエストには、x-claude-code-agent-id および x-claude-code-parent-agent-id ヘッダーが付与され、claude_code.llm_request の OTEL スパンには agent_id および parent_agent_id 属性が含まれるようになりました
- Remote Control、/schedule、claude.ai MCP コネクタ、および通知設定は、ANTHROPIC_API_KEY / apiKeyHelper / ANTHROPIC_AUTH_TOKEN が設定されている場合、Claude.ai ログインが存在していても無効化されます。これらの機能を使用するには API キーを削除してください
- 期限切れの認証情報と forceRemoteSettingsRefresh ポリシー設定が原因で claude のログイン/ログアウト/ステータス操作ができず、回復手段がないというデッドロック現象を修正しました
- autoAllowBashIfSandboxed が、$VAR や $(cmd) などのシェル展開を含むコマンドに対して自動承認を行わない不具合を修正しました
- フックがターミナルに書き込むことで画面内の対話型プロンプトが破損するバグを修正しました。現在はフックはターミナルアクセスなしで実行されます
- HTTP/SSE MCP サーバーがプロトコル以外のデータをストリーミングした際にメモリが無制限に増加する不具合を修正しました。現在、SSE フレームごとのレスポンスボディは 16 MB に制限されています
- Skill(name *) の権限ルールを修正しました。ワイルドカード形式はプレフィックスマッチとして機能し、Bash(ls *) の動作と同様に一致するようになりました
- シンクされた ~/.claude/settings.json への編集をホットリロード設定が検出しない不具合を修正
- マーケットプレイスのキーとマニフェスト名が一致しない場合にプラグインの詳細が読み込めない不具合を修正
- /model ピッカーの「Default」行が ANTHROPIC_DEFAULT_OPUS_MODEL/ANTHROPIC_DEFAULT_SONNET_MODEL のオーバーライドを反映していない不具合を修正
- ストリームキャンセル時にウォッチドッグタイマーがクリアされず、レスポンス完了から 5 分後に不要な「stream idle timeout」エラーが発生する不具合を修正
- MCP サーバーを 10 以上設定し、キャッシュディレクトリが書き込み不可の場合に静かに終了コード 1 を返す不具合を修正 — 現在は根本原因を含むエラーメッセージを表示するように変更
- ダイアログ内のタブ名、リストポインタ、選択行で入力カーソルが点滅する不具合を修正
- マウスクリック後にトランスクリプトビューの文字ショートカットが機能しなくなる不具合を修正
- Bash モードの上矢印キーによる履歴表示で最初のエントリが繰り返され、進行中のドラフトが上書きされる不具合を修正
- 複数の画像を貼り付けたりドロップしたりした際に最後の画像のみが挿入される不具合を修正
- ダークテーマで読みづらい濃紺色のハイパーリンクを使用する不具合を修正 — 現在はアクティブなテーマに適応するように変更
- モデル設定が Opus アリヤになっているサードパーティユーザーに対して、モデルピッカーに冗長な「Current model」行が表示される不具合を修正
- PAYG 3P プロバイダーにおけるレガシー Opus ピッカーエントリがデフォルトエントリと同じモデルに解決されてしまう不具合を修正
- Cursor および VS Code 1.92–1.104 におけるマウスホイールのスクロール速度の不具合を修正 — トラックパッドは一定の速度でスクロールし、マウスホイールはノッチあたり約 3 行分のスクロールを維持する
- Windows Terminal および VS Code で、バックグラウンドセッションにアタッチされた際のスクロール動作を修正しました
- 切断されたサーバーから MCP リソースが @server: オートコンプリートに残り続ける問題を修正しました
- 2 ファイル差分スニペットにおいて、切り捨てられた行数が 1 多く報告される不具合を修正しました
- Grep 検索結果で Windows ドライブ文字パスの相対化が行われず、単一ファイルパスの件数モードで合計値が誤って表示されていた問題を修正しました
- CJK/絵文字において視覚セル幅の計算ミスにより枠組みに埋め込まれたテキストがあふれ出る現象を修正しました
- 曖昧一致ハイライトが絵文字やアストラルプレーンの文字(Unicode の補助平面)をペアの途中で分割してしまう問題を修正しました
- スキル引数名に正規表現メタ文字が含まれていることで引数置換が破綻する不具合を修正しました
- ProgressBar がほぼ満杯の分数セルに対してフルブロックを描画していた問題を修正しました
- 最後の購読者が離脱した際にフェッチ処理が進行中だった場合、タスクポーリングと fs.watch(ファイルシステム監視)が復活してしまう現象を修正しました
- プラグイン依存関係解決において、マニフェスト名とソース識別子が異なる場合に古いカウントが残ってしまう問題を修正しました
- セッションに解析不可能なタイムスタンプが含まれている場合に、Insights の時刻別チャートが歪む不具合を修正しました
- cmd/super/win モディファイアのみを使用するキーバインドが解析不能としてフラグされる問題を修正しました
- --print モードで claude_code.active_time.total OpenTelemetry メトリック(計測指標)が発行されない問題を修正しました
- marketplace 内のクロスプラグインシンボリックリンクを保持せずに claude プラグインの更新が行われる不具合を修正しました
- [VSCode] Cmd/Ctrl+Shift+T を押すことで、直前に閉じたセッションタブを再開くことができます。これは claudeCode.enableReopenClosedSessionShortcut 経由で設定可能です
原文を表示
What's changed
- Added agent view (Research Preview): a single list of every Claude Code session — running, blocked on you, or done. Run claude agents to get started. See https://code.claude.com/docs/en/agent-view
- Added /goal command: set a completion condition and Claude keeps working across turns until it's met. Works in interactive, -p, and Remote Control. Shows live elapsed/turns/tokens as an overlay panel
- Added /scroll-speed command to tune mouse wheel scroll speed with a live preview
- Added claude plugin details to show a plugin's component inventory and projected per-session token cost
- Added transcript view navigation: ? for keyboard shortcuts, {/} to jump between user prompts, v to toggle shortcut panel
- Added hook args: string[] field (exec form) that spawns the command directly without a shell, so path placeholders never need quoting
- Added hook continueOnBlock config option for PostToolUse — set to true to feed the hook's rejection reason back to Claude and continue the turn
- MCP stdio servers now receive CLAUDE_PROJECT_DIR in their environment, matching hooks. Plugin configs can reference ${CLAUDE_PROJECT_DIR} in commands
- Compaction prompt now asks the model to preserve sensitive user instructions
- /mcp Reconnect now picks up .mcp.json edits without a restart, and shows the HTTP status and URL when reconnecting fails
- /context all per-skill token estimates now account for the model's tokenizer and show rounded values
- claude plugin install @ now auto-refreshes the marketplace and retries before reporting a plugin as not found
- /plugin installed-plugin details now show hook event names and MCP server names cleanly
- /context now shows the providing plugin's name for plugin-sourced skills
- Remote MCP server reconnect retry on transient failures is now enabled for all users
- API requests from subagents now carry x-claude-code-agent-id / x-claude-code-parent-agent-id headers, and claude_code.llm_request OTEL spans include agent_id / parent_agent_id attributes
- Remote Control, /schedule, claude.ai MCP connectors, and notification preferences are now disabled when ANTHROPIC_API_KEY / apiKeyHelper / ANTHROPIC_AUTH_TOKEN is set, even if a Claude.ai login also exists. Unset the API key to use these features
- Fixed a deadlock where expired credentials and the forceRemoteSettingsRefresh policy setting blocked claude auth login/logout/status with no way to recover
- Fixed autoAllowBashIfSandboxed not auto-approving commands with shell expansions like $VAR and $(cmd)
- Fixed a bug where a hook writing to the terminal could corrupt an on-screen interactive prompt; hooks now run without terminal access
- Fixed unbounded memory growth when an HTTP/SSE MCP server streams non-protocol data — response bodies now capped at 16 MB per SSE frame
- Fixed Skill(name *) permission rules — the wildcard form now works as a prefix match, matching Bash(ls *) behavior
- Fixed settings hot-reload not detecting edits to symlinked ~/.claude/settings.json
- Fixed plugin details failing to load when the marketplace key differs from the manifest name
- Fixed /model picker "Default" row not reflecting ANTHROPIC_DEFAULT_OPUS_MODEL/ANTHROPIC_DEFAULT_SONNET_MODEL overrides
- Fixed spurious "stream idle timeout" 5 minutes after a response completed, caused by the watchdog timer not being cleared on stream cancellation
- Fixed silent exit 1 when 10+ MCP servers are configured and the cache directory is unwritable — the error message now includes the underlying cause
- Fixed a typing cursor blinking on tab names, list pointers, and select rows in dialogs
- Fixed transcript view letter shortcuts not working after mouse click
- Fixed Bash-mode up-arrow history repeating the first entry and clobbering the in-progress draft
- Fixed pasting or dropping multiple images only inserting the last one
- Fixed hyperlinks using unreadable dark navy on dark themes — they now adapt to the active theme
- Fixed model picker showing a redundant "Current model" row for third-party users whose model is set to the opus alias
- Fixed legacy Opus picker entry on PAYG 3P providers resolving to the same model as the default entry
- Fixed mouse wheel scrolling speed in Cursor and VS Code 1.92–1.104; the trackpad now scrolls at a steady rate and the mouse wheel keeps ~3 lines per notch
- Fixed scroll behavior in Windows Terminal and VS Code when attached to background sessions
- Fixed MCP resources from disconnected servers lingering in @server: autocomplete
- Fixed two-file diff snippets over-reporting the number of truncated lines by one
- Fixed Grep results not relativizing Windows drive-letter paths and count mode reporting wrong totals for single-file paths
- Fixed border-embedded text overflowing on CJK/emoji due to visual cell width miscalculation
- Fixed fuzzy-match highlighting splitting emoji and astral-plane characters mid-pair
- Fixed skill argument names containing regex metacharacters breaking argument substitution
- Fixed ProgressBar rendering a full block for an almost-full fractional cell
- Fixed task polling and fs.watch being resurrected when the last subscriber leaves while a fetch is in flight
- Fixed plugin dependency resolution leaving a stale count when the manifest name differs from the source identifier
- Fixed Insights Time-of-Day chart skewing when a session has an unparseable timestamp
- Fixed keybindings using only the cmd/super/win modifier being flagged as unparseable
- Fixed claude_code.active_time.total OpenTelemetry metric not being emitted in --print mode
- Fixed claude plugin update not preserving cross-plugin symlinks inside a marketplace
- [VSCode] Press Cmd/Ctrl+Shift+T to reopen the most recently closed session tab, configurable via claudeCode.enableReopenClosedSessionShortcut
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み