usage

Claude Code 2.1.261

工具與目錄
在這頁

新功能 8 項

01

技能診斷指令上線,揪出閒置技能與脈絡佔用

⟦整理工具包就像教練定期盤點健身房器材,長期沒人碰又佔走走道的啞鈴就該清出場地。⟧ 當你為 Claude 掛載了五花八門的技能,對話脈絡(context)的容量很快就會吃緊。現在只要輸入 /skill-doctor,畫面就會列出目前載入的所有技能中,哪些從頭到尾都沒被呼叫過,以及它們個別佔用了多少 token(AI 處理與計費的文字單位)。當你發現某些擴充根本沒派上用場卻平白吃掉容量,就能依照診斷結果把它們卸載,替重要的對話釋出更多空間。

官方原文

Added /skill-doctor to show which loaded skills go unused and what they cost in context, so you can prune them

02

指令輸出上限拉高至 128K,支援由檔案讀取子代理提示詞

跑大型建置或查詢長篇日誌時,終端機輸出常因超過預設長度而被截斷存成外置檔案。現在你在設定檔中加入 bashOutputMaxChars 或 taskOutputMaxChars,就能把終端機指令與背景任務直接回傳給 Claude 的內嵌字數上限拉高,最高支援到 128K 字元: ```json { "bashOutputMaxChars": 131072, "taskOutputMaxChars": 131072 } ``` 此外,當你要指派給子代理的系統提示詞(system prompt)過於龐大、無法塞進單行指令列時,也可以改用 --append-subagent-system-prompt-file <路徑> 直接從檔案載入。⟦這有如把貨運小貨車升級成大型貨櫃車,長篇清單不用再拆箱分裝成小紙條,整批資料都能直接載進車廂。⟧

官方原文

Added bashOutputMaxChars and taskOutputMaxChars settings to raise how much command and background-task output Claude receives inline before it is saved to a file, up to 128K characters

Added --append-subagent-system-prompt-file to read the subagent system prompt from a file, for prompts too large to pass on the command line

03

收緊危險刪檔防護,自動模式禁止未授權圖表上傳

⟦把整份講義印在公開影印店的取件網址上,店員會當成講義已經送出店外;碎紙單就算寫在引號裡或用代號,也一樣要再確認才准動手。⟧ 針對高風險的刪除指令,危險 rm 安全提示現在擴大攔截範圍,即使 rm -rf 寫在雙引號包覆的 sh -c 腳本內,或是帶有位置參數(positional parameters,如指令後方代入的變數代號),都會確實跳出確認提示。若連結把內容打包進公開圖表繪製網站的 URL,自動模式會視為上傳到該站,除非你主動要求,否則不再自動放行。

官方原文

Improved the dangerous-rm safety prompt to also catch rm -rf on positional parameters and inside double-quoted sh -c scripts

Changed auto mode to treat a link that packs content into a public diagram renderer's URL as an upload to that site: no longer auto-approved unless you asked for it

04

企業閘道管理強化,組織政策診斷與登入規範更清楚

⟦門牌後黏了樓層號要拆出真門號;門牌讀不出來就拒收,紙本與電子改同一套格式。⟧ /status 與 claude doctor 新增組織政策行,代理攔阻政策載入失敗會標原因。受信任代理在 X-Forwarded-For 附加通訊埠時,閘道會修正客戶端 IP;有 access list 時無法判讀的項目回 403。閘道曾叫 Desktop 用 JSON 匯出 OpenTelemetry,CLI 用 protobuf 時只收 protobuf 的收集器會拒收 Desktop 資料,已對齊。載入受管設定遭拒時改說該組織可能未啟用服務,而非叫你重登入。forceLoginMethod: "gateway" 鎖定時忽略殘留 API key 或 claude.ai 登入並要求 /login;Bedrock、Vertex AI 與 Foundry 工作階段不受影響。

官方原文

Added an "Organization policy" line to /status and claude doctor that says why your organization's policy could not be loaded, such as a proxy not passing the endpoint through

Fixed Claude apps gateway client IP when a trusted proxy appends a port to X-Forwarded-For; with an access list set, an unreadable entry now gets 403

Fixed Claude apps gateway telling Claude Desktop to export OpenTelemetry as JSON even when the terminal CLI uses protobuf, so protobuf-only collectors rejected Desktop's data

Changed a Claude apps gateway 403 on the managed settings load (at startup or after /login) to say Claude Code may not be enabled for the organization, instead of advising a new sign-in

Changed machines whose managed settings pin forceLoginMethod: "gateway" to ignore a leftover API key or claude.ai login and ask for /login; Bedrock, Vertex AI, and Foundry sessions are unaffected

05

雲端驗證流程加速,清楚顯示模型名稱且連線不卡死

設定 Bedrock 時,若 AWS 憑證(credential,證明你是合法使用者的金鑰)輔助程式無回應,引導精靈不會再無限期卡住,而是會在逾時後印出明確錯誤,並修正了在安全檢驗代理伺服器後的檢查失敗。gcpAuthRefresh 在憑證仍有效、只是檢查稍慢時,不會再於啟動時打開瀏覽器;設定 GOOGLE_APPLICATION_CREDENTIALS 也不會再反覆搜尋專案或啟動額外行程。啟動時抓 claude.ai 連接器若逾時,整個工作階段都會看不見它們,CLI 改在背景重試。/model 選單與 VS Code 模型膠囊在辨識得出時,會顯示名稱而非 Bedrock、Vertex AI 或 LLM gateway 的原始 ID。⟦這好比拿著跨國貴賓卡登機,櫃台能直接辨識你的身分並快速放行,遇到連線延遲也會在後台自動補驗,不必每次都把你叫去重辦手續。⟧

官方原文

Fixed the Bedrock setup wizard hanging when AWS or an AWS credential helper never responds (it now times out with a clear error), and its model checks failing behind a TLS-inspecting proxy

Fixed gcpAuthRefresh opening a browser at startup when the Google credential check was slow, even though the credential was still valid

Fixed claude.ai connectors staying absent for the whole session when the startup connector fetch timed out — the CLI now retries in the background

Improved the /model picker and the VS Code model pill to show a model's name instead of its raw Bedrock, Vertex AI, or LLM gateway ID when Claude Code recognizes it

Improved startup on Google Vertex AI when GOOGLE_APPLICATION_CREDENTIALS is set: API client creation no longer re-runs Google Cloud project discovery or spawns extra gcloud processes

06

終端機進度指示精準回報,文字串流加速且計量不浪費

⟦月台資訊看板在列車還在進站時不能亮「已離站」,轉乘等候的倒數也要跟公告上限同一套,不能自己再加一輪。⟧ 在 iTerm2、Ghostty 或 ConEmu 等終端機中,進度指示器以前會在背景工作流程或代理仍在運作時提早把工作階段標記為完成,現在已修正為如實反映背景狀態。文字串流輸出時,排版引擎不再對已繪製完成的區塊重複運算,大幅提升了長篇回覆的顯示流暢度,也修復了容器方向切換時區塊高度異常的罕見錯誤。當你執行 /context 查看容量,若遠端計量服務無法連線,系統會改用本機演算法估算 token(AI 處理與計費的文字單位),不再額外呼叫小型模型浪費資源。遇到 API 無回應標頭時,重試會等到 API_TIMEOUT_MS(預設 10 分鐘)為止,不再另等 3 分鐘,提示訊息會說明可改 API_TIMEOUT_MS。

官方原文

Fixed the terminal progress indicator (iTerm2, Ghostty, ConEmu) showing the session as finished while a background workflow or agent was still running

Fixed a rare layout glitch where a box could render with the wrong height after its container switched between row and column direction

Improved streaming performance: already-rendered blocks are no longer re-checked by layout on each update

Improved handling when the API sends no response headers: the retry now waits up to API_TIMEOUT_MS (10 minutes by default) instead of another 3 minutes, and the messages say what to change

Changed /context token counting to use a local estimate when the token-counting API is unavailable, instead of extra small-model requests

07

[VSCode] 介面內建樣式精靈,直接新增與管理 MCP 伺服器

在 VS Code 擴充套件中自訂輸出風格與工具整合變得更加直覺。Output styles 選單新增了「建立自訂樣式」引導流程,能帶你一步步撰寫自訂輸出樣式檔,完成後立刻列在選單中隨選即用。針對 MCP(Model Context Protocol,讓 AI 連接外部工具的協定)伺服器管理,對話框中現在直接提供了新增表單與刪除按鈕,你再也不用手動切出編輯器去修改設定檔,就能在介面內隨時加入或卸載各類外部工具伺服器。⟦這如同在畫架旁直接加裝模組化置物盒,想換筆刷或顏料伸手就能裝上,不必每次都離開座位去工具箱翻找。⟧

官方原文

[VSCode] Added a "Build a custom style" walkthrough to the Output styles menu that writes a custom output style file and lists it right away

[VSCode] Added an Add server form and a Remove action to the MCP servers dialog, so MCP servers can be added and removed without leaving the IDE

08

[VSCode] 提問與授權提示支援摺疊,排隊對話框不再殘留文字

互動介面上的各類提示卡片迎來了更流暢的操作體驗。權限與提問對話框現在新增了摺疊按鈕,讓你不用關閉提示就能瀏覽後方遮住的對話內容,提示旁的空白區域也能直接滾動對話歷史。連續排隊的授權對話框不會再殘留上一個提示打進去的文字,也避免了因連點而誤觸授權;焦點檢視(Focus view)中已結束的工具呼叫不再錯誤顯示為執行中。以 Claude.ai 或主控台(Console)帳號登入時,重載面板後等待回答的問題卡片會正常重現;使用 /btw 插話提問時,先前工作階段的歷史紀錄也不會再因視窗重載或設定檔出錯而被洗掉。⟦這如同在服務櫃台前加裝透明活動板,既能隨時掀開查看底下的文件明細,叫號處理業務時也不會把上一位顧客留下的便條紙混進下一張表單。⟧

官方原文

[VSCode] Added a fold button to permission and question prompts so the conversation behind them can be read without dismissing them; the space beside the prompt now scrolls the conversation

[VSCode] Fixed Focus view showing a tool call as still running after Claude had moved on, such as while a question waited for your answer

[VSCode] Fixed the next queued permission prompt keeping text typed on the previous prompt and accepting an immediate second click

[VSCode] Fixed /btw side-question history from earlier sessions being overwritten when a question is asked right after a window reload or while a settings file has errors

[VSCode] Fixed the pending question card not reappearing after the Claude panel reloads when signed in with a Claude.ai or Console account

修正 7 項

09

終端機輸入手感翻修,對齊 Bash 快捷鍵與修復漏字

終端機裡的文字輸入與編輯體驗迎來了一批修復。當你快速連打、長按按鍵重複輸入或是整段貼上文字時,字元不再會偶發性掉字或前後順序顛倒;而在輸入框內嵌的 [Image #N] 圖片標籤前,緊鄰的前一個字元現在也能順利按退格鍵刪除。同時,輸入列的單字跳轉與刪除快捷鍵全面對齊 Bash 行為:按 Ctrl+W 會往回刪除到前一個空格,Alt+F 與 Alt+D 會精準停在單字結尾,標點符號也會被視為單字分界,而舊有的 keybindingFlavor 設定則不再產生作用。⟦這就像換上一支書寫順暢的鋼珠筆,不管寫得多快都不會斷水卡墨,修改詞句時的橡皮擦也能精準擦到邊界。⟧

官方原文

Fixed typed or pasted characters occasionally landing out of order or being dropped during fast input or key repeat

Fixed being unable to delete the character immediately before an inline [Image #N] chip in the prompt input

Changed the prompt's word-editing keys to match Bash: Ctrl+W deletes back to whitespace, Alt+F and Alt+D stop at word end, punctuation separates words; keybindingFlavor no longer has any effect

10

遠端操控同步修復,狀態顯示與離線佇列精準更新

透過手機或瀏覽器使用遠端操控(Remote Control)時,多項跨裝置狀態同步問題已全面修正。現在終端機切換權限模式,或是行動端連入終端機工作階段時,不會再顯示過期的權限狀態;從手機停止運作或執行 /clear 指令後,按鈕與旋轉載入圖示會即時歸位,不再卡在忙碌中。使用 /teleport 拉取的工作階段不會再重複附加到雲端對話紀錄,自訂的精力等級(effort level)也能正確呈現在網頁上。在 Windows 企業代理伺服器環境下的事件串流已修復,若向另一台離線機器的工作階段發送 SendMessage,系統也會明確告知訊息已進入佇列等候重連。⟦這有如拿著對講機指揮總部作業,雙方的狀態訊號隨時同步,發給離線人員的留言也會妥善留在收件箱中等待簽收。⟧

官方原文

Fixed Remote Control showing a stale permission mode when a phone, browser, or claude.ai app attaches to a terminal session or after the mode changes in the terminal

Fixed Remote Control sessions showing as still working (stuck spinner and Stop button) after stopping a turn from a connected phone or browser, or after a local slash command like /clear

Fixed Remote Control uploading a session pulled with /teleport into the connected session, which appeared appended to the original on phone and web

Fixed Remote Control's inbound event stream failing behind TLS-inspecting corporate proxies on native Windows

Fixed Remote Control sessions showing the default effort level on claude.ai when the effort comes from settings

Fixed SendMessage to an offline Remote Control session on another machine reading as delivered; the result now says delivery is queued until that machine reconnects

11

工作階段恢復不掉訊,多代理協作快取與外掛同步修復

中斷後重新接續工作階段時,系統現在能更忠實還原當時的上下文。以前恢復工作階段時,平行工具呼叫旁的掛鉤(hook,特定事件發生時被觸發的小程式)輸出常會遺失,現在已能完整保留;使用 claude -p --resume 若遇到紀錄檔內的工作階段識別碼損壞,也會自動配發新識別碼安全重啟。在多代理協作中,隊友代理在第二輪不會再重複廣播初始技能,確保前綴完整並命中快取(cache,把查過的結果暫存起來直接用);背景代理若無法喚醒,也不會再陷入迴圈空轉消耗 CPU。此外,剛送出提示詞立刻按下停止現在能確實中斷執行,雲端工作階段強制啟用已同步的外掛時,也不會再錯誤降級至市集備援版本。⟦這就像接力賽交棒,跑者換人時能精準接過寫滿備忘的交接棒,不用重新宣告身分,遇到突發狀況也能立刻煞車。⟧

官方原文

Fixed resuming a session losing hook output and other context around parallel tool calls, which changed the resumed request

Fixed claude -p --resume <file> adopting a malformed session ID recorded in the transcript; it now resumes under a fresh session ID instead

Fixed SDK and cloud sessions ignoring a Stop or interrupt sent just after the first prompt, before the turn had started; the turn now stops instead of running to completion

Fixed sustained high CPU usage when a background agent could not be resumed and its wake-up was retried in a tight loop

Fixed in-process agent-team teammates re-sending their first-turn tool and skill announcements on the second turn, which changed the request prefix and missed the prompt cache

Fixed cloud sessions discarding a plugin synced from claude.ai when managed settings force-enable it in enabledPlugins, then falling back to a marketplace clone that could fail

12

跨工具協作修復,自動掛載目錄與用量查詢更穩定

掛載在 /net automount 網路目錄下執行 /add-dir 加入子資料夾時,系統不再會誤報找不到路徑;當同一台電腦安裝多個版本時,高版本的功能旗標也不會再錯誤干擾舊版本。當用量端點被限流,或剛啟動就打開時,/usage 與 VS Code 用量面板不再丟掉特定模型的每週額度列。桌面版與網頁版在僅監聽產物(artifact)更新時,狀態也不會再錯誤卡在忙碌中。此外,桌面版 Cowork 工作階段中透過 Chrome 擴充上傳檔案的錯誤已排除,背景執行的指令若輸出外掛安裝提示,也能正確被系統辨識,不會把原始的 <claude-code-hint> 標籤洩漏到對話框裡。⟦這宛如在多工工地整頓各組機具,圖紙路徑標註清晰,讓不同的協作工具各司其職且不互相打架。⟧

官方原文

Fixed /add-dir <subdirectory> printing a false "couldn't be resolved" error when the working directory is on a /net automount

Fixed feature flags gated to a newer version occasionally applying to an older Claude Code version running on the same machine

Fixed /usage and the VS Code usage panel dropping a model-specific weekly limit row when the usage endpoint is rate limited or when opened right after startup

Fixed Desktop and web showing a session as busy while it only watches an artifact for updates

Fixed Claude in Chrome file_upload failing with "paths: expected array, received undefined" in local Cowork sessions run from the Claude Desktop app

Fixed plugin install hints from CLIs run in background Bash commands: they are now detected, and the raw <claude-code-hint> tag no longer leaks into the conversation

13

[VSCode] 工作階段清單標示強化,支援封存與分頁修復

⟦管理多個工作階段就像整理辦公室公文夾,哪些案件正在其他部門借閱中、哪些該歸檔,都該有清楚的視覺標記。⟧ 工作階段清單現在為終端機、其他視窗或桌面版開啟中的工作階段標上空心圓圈,不再看起來像已關閉;右鍵選單加入了「封存工作階段」(Archive session)功能,解除封存也有了專屬圖示。隨視窗還原的分頁在重新命名時,輸入框會正確帶出當前名稱而非一片空白;清單中已摺疊的分類在面板載入時不會再短暫閃爍展開,修正背景分頁識別碼時選取列的高亮也不會卡死。透過快速鍵或連結重新開啟分頁時,Claude 分頁也會精準回到既有的編輯器分組中。

官方原文

[VSCode] Added a hollow ring in the session list for sessions open in a terminal, another VS Code window, or Claude Desktop, so they no longer look closed

[VSCode] Added "Archive session" to the session list's right-click menu and gave Unarchive its own icon

[VSCode] Fixed the session tab's Rename box opening empty for a tab restored with the window; it now starts with the current name

[VSCode] Fixed collapsed sections in the session list panel briefly showing expanded each time the panel loaded

[VSCode] Fixed the session list's active-row highlight going stale when an unfocused Claude tab's session ID is corrected

[VSCode] Fixed Cmd/Ctrl+Shift+T reopen and deep-link opens placing the Claude tab outside the Claude editor group when a Claude tab has focus

14

[VSCode] 雲端工作階段遷移修復,分組與多視窗同步更穩定

⟦跨裝置切換開發環境就像在不同會議室之間移動白板,任何未完的討論都該原樣帶入新空間。⟧ 從網頁版傳送(teleport)工作階段至本機時,若雲端關閉時恰好有提問中斷,系統不會再將其誤判為拒絕;將網頁工作階段加入分組時,也不會再同時出現在兩個群組中。清單開的分頁重載後不跳回舊工作階段;Web 開的分頁重載後不重跑 teleport、不留白。設定「Enable Remote Control for all sessions」會立刻套用到其他 VS Code 視窗。Open 篩選器能對上從 claude.ai 續接、分頁仍記在 web session 的項目,篩選選單區塊加上螢幕報讀標籤。「Start new session in this group」在 New conversation 後不再丟掉群組;sidebar 未讀清單載入前就結束的工作階段,不再缺未讀點。

官方原文

[VSCode] Fixed a session teleported from Claude Code on the web treating a question that was cut off when the cloud session shut down as declined

[VSCode] Fixed the session tab's "Add to group" putting a session opened from Claude Code on the Web in two groups; it now moves the entry the session list shows

[VSCode] Fixed a tab opened from the session list jumping back to that session, and a tab opened from a Web session restarting its teleport or staying empty, after VS Code reloads the tab's view

[VSCode] Fixed "Enable Remote Control for all sessions" so flipping it also applies right away to sessions open in other VS Code windows

[VSCode] Fixed the session list's Open filter for sessions continued from claude.ai whose tab was still recorded under the web session, and labeled the filter menu's sections for screen readers

[VSCode] Fixed "Start new session in this group" losing the group after New conversation, and a missing unread dot for a session that finished before the sidebar's unread list loaded

15

[VSCode] 模型選單整併為單一清單,用量指示與登入防護修復

模型選擇器與側邊欄狀態管理在此次更新中進行了整頓。模型選單現在改為平整的單一清單,舊有名稱寫法統一排在最後,且能即時隱藏公司已停用的模型。若設定了停用登入提示,介面就不會再於未登入時強行跳出登入畫面;當某個面板切換至第三方模型供應商時,其他面板也不會再殘留官方專屬功能。新視窗側邊欄的用量計量表現在一開就能正常顯示,不再漏掉零用量上限;此外外掛安裝連結能正確喚起確認對話框,分頁標籤在執行中不會再誤亮未讀徽章,封存的工作階段也能順利加入分組。⟦這好比餐廳重新整理總菜單,下架品項一目了然,服務生也不會拿著舊通行證向已免檢的客人反覆查驗身分。⟧

官方原文

[VSCode] Fixed the model picker showing models an organization has since disabled until the window was reloaded twice

[VSCode] Fixed claude.ai-only features staying visible in a window's other Claude panels after one panel picked up a third-party provider from a settings file

[VSCode] Fixed the sign-in screen appearing despite the Disable Login Prompt setting when Claude Code reports no login or a request fails for lack of one

[VSCode] Fixed install-plugin links opening the Claude sidebar without the install dialog in a window where only the session list had been shown

[VSCode] Fixed the sidebar usage meter staying empty on a new window until the Account & usage dialog was opened, and a 0% usage limit being left out of the meter

[VSCode] Fixed the editor tab badge showing unread during a running turn or missing on a tab opened from the session list, and "Add Session Tab to Group" doing nothing for an archived session

[VSCode] Changed the model picker to one flat list of every model, with rows kept for older model spellings listed last