usage

Claude Code 2.1.221

工具與目錄
在這頁

新功能 9 項

01

VS Code 對話可收起工具細節

你在 VS Code 裡跟 Claude 對話,想看回答卻被一串工具操作淹沒時,現在可以切到 Focus view(焦點檢視,把每回合的工具活動收在可展開摘要裡)。聊天選單、Ctrl+Alt+F,或「Claude Code: Toggle Focus view」指令都能切換;摘要仍會顯示哪個工具正在執行。它像把廚房做菜的過程合起來,只把菜單留在桌上:要追查時再掀開,平常不必被鍋碗瓢盆擋住。

官方原文

[VSCode] Added Focus view: a chat-menu toggle that hides tool activity behind an expandable per-turn summary with a live running-tool indicator, toggled with Ctrl+Alt+F or the "Claude Code: Toggle Focus view" command

02

沙盒保住憑證,也撐住大型上傳

Linux 或 WSL 裡的沙盒(sandbox,把程式限制在隔離範圍內執行)現在可把憑證檔設成 mode: "mask"。裡頭的命令讀到的是替身檔,連 extract 正規表達式(用符號匹配字串的語法)挑出的片段也能替換;資料要送出沙盒時,代理才換回真值。macOS 沒有這種遮罩能力,會改成拒絕讀取。另一方面,經過沙盒代理的大型上傳不再因 TLS 錯誤失敗。像寄件櫃檯先給你一張遮住關鍵欄位的影本,真正交件時才由櫃員換入原件。

官方原文

Added mode: "mask" for sandbox credential files on Linux and WSL — sandboxed commands read a sentinel copy (the whole file, or just the spans captured by an extract regex) while the sandbox proxy substitutes the real value on egress; on macOS file masking falls back to deny

Fixed sandboxed large uploads failing with TLS errors through the sandbox proxy

03

外掛與提示詞先做相容性體檢

準備發布外掛或調整 API 提示詞時,現在多了兩道早期提醒。claude plugin validate 會警告:市集或外掛名稱若不符合 Claude Desktop 的受管理市集同步規則,之後會被拒絕。claude-api skill 也新增 prompt-audit 子指令,會檢查提示詞與工具說明是否還沿用為舊模型寫的模式。這像送印前先讓校稿機檢查店名能不能掛上招牌、文案格式能不能被新版印刷機讀到;問題在上架前看見,而不是同步失敗後才猜原因。

官方原文

Added warnings to claude plugin validate when a marketplace or plugin name would be rejected by Claude Desktop's managed marketplace sync

Added a prompt-audit subcommand to the claude-api skill for auditing prompts and tool descriptions for patterns written for older models

04

沒有共同歷史的 /ultrareview 會先說明

你用 /ultrareview 比對目前儲存庫與基準分支,兩者若沒有共同 Git 歷史,錯誤訊息現在更能指出下一步。完全沒有分支的 checkout(簽出副本,Git 目前取出的工作版本)會立刻被拒絕,並建議先建立分支;已是完整副本的情況,也不會再亂建議 git fetch --unshallow。這像地圖導航發現起點根本沒有接上道路時,會叫你先選一條路,而不是硬叫你去挖一條其實已經挖好的隧道。

官方原文

Improved /ultrareview error messages when a repo shares no history with its base: a checkout with no branches is now refused up front with advice to create one, and refusal hints no longer suggest git fetch --unshallow on clones that are already complete

05

背景工作改為保留成果,是否開 PR 看任務

背景工作階段完成任務後,現在會 commit 並 push,讓做出的工作有地方可保存;但 draft PR(草稿合併請求,尚未準備合併的程式碼提案)只在任務本身要求時才開。它也會遵守你專案的 CLAUDE.md Git 指示,最後一定回報成果放在哪裡。這項行為會影響協作流程:把背景工作想成代你整理檔案的同事,他會把成品歸檔並告知位置,卻不會未經任務要求就送出一份請人審核的提案。

官方原文

Changed background sessions to commit and push to preserve work, open a draft PR only when the task calls for one, follow your CLAUDE.md git instructions, and always end by reporting where the work lives

06

外掛安裝會重試,裝好可立即啟用

輸入 /plugin install 找不到外掛時,它會先刷新過期的市集目錄並重試,再告訴你真的找不到。從 /plugin 裝好的外掛,只要安全,現在會立刻啟用,不必一律再輸入 /reload-plugins。外掛也可把 skills 路徑寫成 "." 代表根目錄;根層 SKILL.md 驗證失敗時,錯誤訊息會明說應該使用外掛根目錄。像店員先更新庫存再說缺貨,新買的零件能直接裝上,而說明書放在盒子最上層也能被正確找到。

官方原文

Changed /plugin install to refresh a stale marketplace catalog and retry before reporting a plugin not found

Changed plugins installed from /plugin to activate immediately when safe, instead of always requiring /reload-plugins

Changed plugins to accept "." as a skills path, and the root-level SKILL.md validation error now suggests using the plugin root

07

工作階段種類、表情與 /fork 各有新提示

想知道眼前工作階段是否還在你手上,/status 現在會標示它是 interactive,還是背景工作且為 attached 或 unattended。打表情符號時,常見替代短碼 :thumbsup:、:thumbsdown:、:love: 也會補全。至於用 /fork 分出新工作階段,它會替自己建立一份工作樹(worktree,Git 讓同一專案平行開多份副本的功能),不再直接在原工作階段的簽出副本裡工作。像看班表就知道誰值班、通訊軟體聽得懂不同簡寫,而分派的新同事也會拿到自己的桌面。

官方原文

Changed /status to show the session kind: interactive, or a background job that is attached or unattended

Changed emoji autocomplete to accept common alternate shortcodes like :thumbsup:, :thumbsdown:, and :love:

Changed sessions forked with /fork to create a new worktree of their own instead of working in the original session's checkout

08

瀏覽器、快速模式與 Monitor 都會交代收尾

Claude in Chrome 完成工作、不再需要自己開的分頁後,會把那些分頁關掉。快速模式(fast mode,優先加快回應的模式)若在工作階段中途用完 usage credits(可用額度),串流回應會直接說明,不再沉默失敗。Monitor 裡的 watch(持續觀察命令輸出的功能)若結束前沒有任何輸出,也會明說「沒有輸出」,不再只寫含糊的「stream ended」。像助理借用幾張參考頁後會收好,預算耗盡會當面告知,巡邏員空手回來也會說他整趟沒看到事。

官方原文

Changed Claude in Chrome to close the browser tabs it opens once it no longer needs them

Changed fast mode to report on the stream when usage credits run out mid-session, instead of failing silently

Changed Monitor: a watch that exits without producing any output now says so instead of reporting "stream ended"

09

Gateway 驗證更嚴格,過期權限提醒不再重複

Gateway 收到 model 欄位不是字串時,現在會直接回 400 錯誤,不會照單全收再往後端轉送。這讓資料格式錯誤在入口就被擋下。另一邊,auto-mode 分類呼叫還排隊時如果權限模式改了,核准提示不會再反覆顯示那條變更通知。像郵局櫃檯看到地址欄塞進一張照片就當場退件,而不是把怪資料一路送到分揀中心;公告貼過一次,也不會每次排隊都重新貼滿牆。

官方原文

Changed the Gateway model field validation: non-string values are rejected with a 400 instead of being forwarded

Removed the repeated "Permission mode changed while the auto-mode classifier call was queued" notice from approval prompts

效能 2 項

10

自動模式的權限判斷更省快取,也看得見用量

Google Vertex AI 上的 Claude 4.5 世代以上模型,tool search(工具搜尋,讓模型找可用工具的功能)重新可用。自動模式處理平行工具呼叫的權限判斷時,會更有效率地使用快取(把算過的結果暫存起來直接用);切換模式剛好碰上尚未完成的檢查,也會重新問你,而不套用過期結果。同一段對話前綴會重複用於判斷,因而降低 prompt-cache 成本。Stats 面板則把快取 token 納入總數,分開列出輸入、輸出、快取讀取與寫入。就像收費停車場重用已驗過的車牌資料,並把每種計費清楚印在收據上。

官方原文

Improved tool search on Google Vertex AI: re-enabled for Claude 4.5-generation and newer models

Improved auto mode: permission checks for parallel tool calls are now cache-efficient, and switching modes while a check is pending reliably prompts instead of applying the stale result

Reduced prompt-cache costs for auto-mode permission checks by reusing the cached conversation prefix across decisions

Improved Stats panel to count cache tokens in its token totals, with a breakdown by input, output, cache read, and cache write

11

Windows 啟動不再為查時間叫出 PowerShell

Windows 啟動 Claude Code 時,程式要讀取行程建立時間,現在直接呼叫原生的 kernel32,不再為這件事另外啟動 PowerShell。若公司的 endpoint security(端點安全工具,監看電腦程式行為的防護軟體)會攔住 powershell.exe,也就不會再跳出不必要的詢問。這不是少查資料,而是改走 Windows 自己的服務窗口;像大樓住戶查電錶,不必每次都叫外包技師進門,因此保全也不用反覆放行。

官方原文

Improved Windows startup: process creation times are now read via a native kernel32 call instead of spawning PowerShell, so endpoint security tools that gate powershell.exe no longer prompt

修正 7 項

12

Bash 與 PowerShell 的權限檢查補洞

命令看似只是條件判斷,裡面卻藏了另一道指令時,權限檢查現在不會再放過它。先前 zsh 能在 Bash 工具的 [[ ]] 正規表達式條件裡執行隱藏命令,避開確認;這類命令現在都會要求權限。Windows 的 PowerShell 若路徑含引號,檢查也曾處理錯誤,現在同樣會請你核准。門禁像是終於會翻開包包夾層檢查,而不是只看外袋標籤;路徑裡有特殊字元,也不會讓它看錯證件。

官方原文

Fixed a Bash tool permission-check bypass where zsh could execute hidden commands in [[ ]] regex conditionals; affected commands now prompt for permission

Fixed PowerShell permission checks mishandling paths containing quote characters on Windows; such paths now prompt for approval

13

思考切換與 MCP 連線不再偷偷回復

工作階段一開始關掉 thinking(思考模式,讓模型保留更多推理過程的開關)後,再把它打開,現在會確實影響這一整段對話。連線中的 MCP(Model Context Protocol,讓 AI 連接外部工具的協定)伺服器若被停用,也不會悄悄自己恢復。另一個修正針對 claude -p:透過 --mcp-config 加入的伺服器會在第一回合前連好,不再讓模型把本該執行的工具呼叫原樣印成文字。這就像關掉一台設備後,控制台不會趁你轉身又把它接回電源。

官方原文

Fixed the thinking toggle having no effect for the rest of a session that started with thinking off; disabling an MCP server mid-connect no longer silently reverts

Fixed MCP servers from --mcp-config not being connected before the first turn in print mode (-p), which made the model emit tool calls as literal text

14

重送提示詞、SDK 工具與搜尋都更可靠

你按 Esc 撤回提示詞後又送一次,先前用 @ 指名的檔案不會再無聲消失。開發者若用 SDK 的 MCP 工具,工具名稱剛好是 JavaScript 內建物件屬性,例如 constructor,準備 API 請求時也不會崩潰。至於關閉 thinking 後以 xhigh 或 max effort(投入更多推理資源的等級)跑 WebSearch,原本會收到 400 錯誤,現在可正常搜尋。像重新遞一份附檔申請書、讓窗口正確辨認罕見姓氏,最後也讓高難度查詢真的送進資料庫。

官方原文

Fixed @-mentioned files being silently dropped when pressing Esc to retract a prompt and resubmitting it

Fixed a crash when preparing API requests for SDK MCP tools named after built-in object properties such as constructor

Fixed WebSearch failing with a 400 error at effort xhigh/max when thinking is disabled

15

額度訊息與 Windows 的 AWS 登入說清楚

Team 或 Enterprise 用戶碰到 spend limit(支出上限)時,訊息終於會指向自己的個人上限,而不是錯怪組織的月上限。Windows 的桌面受管理工作階段裡,使用 AWS SSO 命名設定檔登入 Bedrock 時,若電腦碰巧有多餘的 HOME 環境變數(啟動程式前預先給它的設定值),也不會再登入失敗。前者像信用卡通知終於指出是你的卡刷到上限;後者則像門禁不再被一張放錯抽屜的地址便條帶錯路。

官方原文

Fixed Team and Enterprise spend-limit message incorrectly blaming the org's monthly limit instead of your individual spend limit

Fixed Bedrock authentication with AWS SSO named profiles failing in desktop-managed sessions on Windows machines that set a stray HOME environment variable

16

自動續接與重新驗證少了意外

若你明確設 CLAUDE_CODE_RESUME_INTERRUPTED_TURN=0,被打斷回合的自動續接現在真的會關掉;其他代表關閉的 falsy 值也會被尊重。電腦睡醒時,兩個 Claude Code 行程偶爾會同時更新同一個 MCP 連接器或 WIF OAuth token(用來證明登入身分的授權令牌),互相踩到而逼你重登;現在避免了這場競跑。像在交接簿寫下「不要自動續辦」後,值班人員不會照樣替你開案;兩人也不會同時搶著換同一把門鎖。

官方原文

Fixed CLAUDE_CODE_RESUME_INTERRUPTED_TURN=0 not disabling interrupted-turn auto-resume; falsy values are now honored

Fixed a rare wake-from-sleep race where two Claude Code processes could both refresh the same MCP connector or WIF OAuth token at once, forcing re-authentication

17

工作階段名稱與外掛狀態不再失聯

你在 Claude Code Desktop 或 claude.ai 改工作階段名稱,CLI 現在也會更新,而且不論從哪個介面改都會先整理名稱格式。非互動工作階段(沒有終端機視窗、直接執行的模式)裡,外掛或組織派發的 skill(技能,告訴 Claude 如何處理特定工作的指示)若剛好叫 /help、/feedback 等終端機內建名,也能叫得動。外掛重載完成後,「Plugins changed」通知也會自動消失。像同一份行程表在手機、網頁與櫃檯都用同名,活動結束的提醒則會自行撤牌。

官方原文

Fixed renaming a session from Claude Code Desktop or claude.ai not updating the CLI's session name; session names from every rename surface are now sanitized

Fixed plugin- and org-delivered skills named after terminal-only built-ins (e.g. /help, /feedback) being un-invocable in non-interactive sessions

Fixed the "Plugins changed" notification lingering after plugins were reloaded instead of clearing

18

Vim 模式記得複製內容,也更懂返回時機

用 Vim mode(Vim 模式,用鍵盤指令編輯文字的操作方式)編寫提示詞時,yank register(暫存複製文字的位置)不會再因為開過對話框、搜尋歷史或看逐字稿就被清空。另一個小但重要的修正是:你一路 undo 回空白提示詞後,第一次按左箭頭會先準備「再按一次才回代理畫面」的確認,而不是立刻跳走。像剪貼簿不會因為你翻了幾頁文件就倒空;走到門口也會先亮警示燈,免得你按錯一步就離開編輯桌。

官方原文

Fixed Vim mode: the yank register now survives dialogs, history search, and the transcript view instead of being silently emptied

Fixed Vim mode: undoing back to an empty prompt now arms the "press ← again" confirm before returning to the agent view