usage

Claude Code 2.1.243

工具與目錄
在這頁

新功能 8 項

01

/usage 新增循環用量拆解,閒置喚醒自動摺疊

⟦就像保全巡邏打卡鐘,如果保全每隔一段時間只是路過且一切正常,打卡記錄會自動摺疊成單一行,不必在記錄簿上印出滿滿的重複字句。⟧ 當你在終端機使用 /loop 執行循環任務時,系統現在能更清楚掌握執行細節。輸入 /usage 指令會顯示全新的 Loops 拆解資訊,列出每個循環的執行次數、總 token(計費與計量文字單位)、每次平均 token 與最後執行時間,方便你一眼揪出暴衝或過度頻繁的循環任務。此外,當 /loop 連續喚醒卻沒有任何待辦事項時,終端機會把這些無事可做的喚醒紀錄摺疊成單一行,不再頻繁洗版。

官方原文

Added a Loops breakdown to /usage: per-loop run count, total tokens, tokens per run, and last run, so runaway or chatty /loop tasks are easy to spot

Improved /loop: consecutive wake-ups where Claude has nothing to do now fold into a single line in the terminal instead of printing each one

02

模型選單支援自訂排序,雲端平台指令即刻生效

你現在能隨心所欲整理模型清單了。在設定檔加入 modelPicker 設定,即可自訂 /model 挑選器中的模型順序與標籤,甚至支援 Vertex 與 Bedrock 的自訂模型識別碼,可選擇附加在內建清單後或直接完全取代。在挑選器中選取 Ultracode 也已修復,會確實套用至當前工作階段(session)。模型挑選器與內建的 claude-api 技能同步更新,將 Sonnet 5 每百萬 token 為 2 與 10 美元的定價標示為標準牌價,而非限時優惠。此外,在 Bedrock、Vertex、Foundry 或關閉遙測的環境下,輸入 /model、/fast 與 /effort 指令會立即執行,不再排隊等待當前回合結束。⟦這宛如餐廳換上自訂特選菜單,顧客點選招牌菜能立即備餐,省去在點餐機前久候的時間。⟧

官方原文

Added modelPicker setting: curate the /model picker with an ordered, labeled list of models (any id spelling, including Vertex/Bedrock ids), appended to or replacing the built-in lineup

Fixed the /model picker silently ignoring an Ultracode selection; picking Ultracode now applies it to the current session

Updated the /model picker and the bundled claude-api skill to show Sonnet 5's $2/$10 per Mtok pricing as its standard list price rather than a limited-time promo

Changed /model, /fast, and /effort to also run immediately instead of queueing until the turn ends on Bedrock, Vertex, and Foundry and when telemetry is disabled

03

提示詞快取存活期獨立設定,主對話延長一小時

⟦如同辦公室的公文歸檔,主桌面上的重要專案資料可以常駐保留 1 小時暫存,而隨手派發給跑腿小幫手的臨時便條紙則只暫存 5 分鐘。⟧ 現在使用 API 金鑰或雲端平台提供者的人,能獨立控制快取(把算過或查過的結果暫存起來直接用)的存留時間了。系統新增了 promptCacheTtl 與 subagentPromptCacheTtl 設定項目,讓你在主要對話中維持長達 1 小時的提示詞快取以節省重算開銷,同時讓短暫運作的子代理維持 5 分鐘快取,精準控制資源配置。

官方原文

Added promptCacheTtl and subagentPromptCacheTtl settings so API-key and cloud-provider users can keep a 1-hour prompt cache on the main conversation while subagents stay at 5 minutes

04

企業受管定價計算真實成本,來源優先級清楚標記

企業內部統一派發設定時,費用計算與設定來源變得更加透明。管理者現在可透過受管設定配置 modelPricing。這讓 /cost 指令、狀態列(status line,終端機最底下那行即時資訊)與遙測費用統計直接採用公司合約中的個別模型單價與折扣乘數,不再只顯示公開牌價。輸入 /status 時新增了 Skipped sources 資訊行,清楚列出雖然存在(例如 managed-settings.json)但因較高優先級來源生效而未被採用的設定檔。而在 /mcp 與 /plugins 清單中,由組織統一管理身分驗證的 claude.ai 連接器也會加上 managed 標記。⟦如同企業員工憑合約特約享有專屬折扣,報銷清單上能清楚查驗計費來源與派發標記。⟧

官方原文

Added modelPricing managed setting so an organization's contracted per-model rates and discount multiplier are used for /cost, the status line, and telemetry cost figures instead of list price

Added a Skipped sources line to /status that lists managed settings sources (for example managed-settings.json) present but not applied because a higher-precedence managed source is active

Added a managed marker in /mcp and /plugins on claude.ai connectors whose authentication is managed by your organization

05

網頁版 GitHub 狀態即時檢查,舊版工具驗證相容

在網頁版使用 Claude Code 搭配 GitHub 專案時,連線狀態一目了然。針對尚未為網頁版綁定 GitHub 的 claude.ai 使用者,系統會主動跳出提示引導你前往 /web-setup 進行設定。在狀態列(status line,終端機最底部的即時狀態行)輸入 /status,現在會明確標示 Pro 或 Max 方案在網頁版的 GitHub 連線狀態,未連線時也會附上 /web-setup 連結。此外,如果你的電腦上安裝的是尚未支援 gh auth token 的舊版 GitHub CLI(GitHub 命令列工具),/web-setup 不會再因為讀不到該指令而無限次重複要求你重新登入。⟦此舉有如儀表板上的連線檢測燈號,主動指引尚未驗證的通訊線路並相容既有的舊款通行證。⟧

官方原文

Added a tip pointing claude.ai users who haven't connected GitHub for Claude Code on the web to /web-setup

Added a /status line showing whether GitHub is connected for Claude Code on the web (Pro/Max), pointing to /web-setup when it isn't

Fixed /web-setup repeatedly asking you to log in when an older GitHub CLI (without gh auth token) was already authenticated

06

CI 環境共享授權令牌,用量遙測精確歸屬組織

在持續整合(CI)與企業環境中執行時,身分驗證與用量歸屬更加完善。在 CI 的工作負載身分同盟環境下,同一個作業中的多個處理程序現在會共用已兌換的 token(授權令牌)。系統不會再因重複兌換單次有效的令牌而導致失敗,若兌換遭拒也會直接顯示伺服器回傳的錯誤訊息以便快速排除。針對直接使用 ANTHROPIC_AUTH_TOKEN 向 Anthropic API 進行身分驗證的工作階段(session),其使用量遙測數據現在會正確歸屬至你的所屬組織,落實企業的資料處理政策。在 VSCode 中使用 Claude 帳號登入時,擴充套件本身的用量遙測也同步套用該歸屬規則。⟦這如同出差團隊共用同一張換領證明完成各項任務,並將所有公務開銷精確歸戶至所屬部門。⟧

官方原文

Fixed workload identity federation in CI: processes in one job share the exchanged token instead of re-exchanging the single-use token; a rejected exchange fails fast with the server's message

Improved attribution of usage telemetry to your organization for sessions that authenticate with ANTHROPIC_AUTH_TOKEN directly against the Anthropic API, so its data-handling settings apply

[VSCode] Improved attribution of the extension's own usage telemetry to your organization when you are signed in with a Claude account, so its data-handling settings apply

07

啟動加速免等外部工具,下載瘦身與記憶體隨選載入

啟動速度與記憶體佔用迎來全方位瘦身優化。現在啟動時不再被沙盒與 MCP(讓 AI 連接外部工具的協定)初始化卡住首頁畫面,直接啟動會跳過子指令註冊,設定檔與工作流的讀取也變得更輕量。安裝檔與自動更新改採 zstd 壓縮,以 Linux x64 為例下載體積從原本的 340 MB 大幅縮減至約 75 MB;內建技能與提示詞經過壓縮後,原生二進位檔體積也縮減約 2 MB。在執行階段,程式碼改為隨選載入而非全部常駐記憶體。每個工作階段(session)約可節省 40 至 70 MB 記憶體,長久運作時也會在堆疊增長時提早進行垃圾回收以降低峰值用量。⟦這好比跑車全面進行輕量化改裝,既縮減零件體積也只在需要時調用模組以節省引擎負擔。⟧

官方原文

Improved startup time: sandbox and MCP bring-up no longer block the first frame, bare launches skip subcommand registration, and workflow discovery, settings, and trust-store work is cheaper

Improved native install and auto-update download size: the binary is now zstd-compressed (about 75 MB instead of 340 MB on Linux x64)

Improved native binary size: about 2 MB smaller by storing the bundled skill and prompt text more compactly

Improved memory usage of native builds: code is now loaded on demand instead of keeping the whole bundle resident (roughly 40–70 MB less memory per session)

Improved peak memory usage in long-running sessions (the runtime now garbage-collects sooner as the heap grows)

08

macOS 桌面點擊授權,瀏覽器連線與長對話歷史保留

跨平台與編輯器整合的各項操作體驗更為穩固。在 macOS 上使用電腦操作(computer use)功能時,點擊桌面、Dock 應用程式列或 Finder 視窗現在需要透過存取對話框授予 Finder 權限,符合一般應用程式的安全授權規範。針對 Chrome 瀏覽器外掛整合,修復了自動更新刪除舊版本後導致瀏覽器與 Claude Code 連線中斷的問題,原生連線程式現在改透過穩定的 claude 啟動器載入。在 VSCode 長時間對話的工作階段(session)中,修剪過長歷史紀錄時會優先移除舊的工具操作細節,確保你的訊息與 Claude 的回覆文字持續完整可見。⟦如同辦公大樓嚴格控管各處出入口授權,長久對話記錄也能妥善去蕪存菁以保留核心發言。⟧

官方原文

Fixed Claude in Chrome losing its connection to Claude Code after an auto-update cleaned up the version it was set up with; the native host now launches via the stable claude launcher

Changed computer use on macOS so clicking the desktop, Dock, or a Finder window requires granting Finder via the access dialog, like any other app

[VSCode] Improved history trimming in long sessions: older tool-activity rows are dropped first so your messages and Claude's replies stay visible

修正 12 項

09

免金鑰 Console 帳號登入,SSH 網址複製與公告修復

⟦就像大樓訪客登記處,員工只要出示總部工作證就能直接感應通關,不必每次手動填寫臨時通行金鑰。⟧ 登入驗證流程有了諸多貼心改善。現在執行 /login 前往 Anthropic Console 時,新增了免金鑰的「使用 Console 帳號登入」建議選項,方便禁止建立 API 金鑰的企業員工快速登入。透過 SSH 遠端連線登入時,登入網址會立即顯示,按下鍵盤 c 鍵會誠實回報網址如何複製而非一律回傳成功,全螢幕模式下也會附帶選取文字的提示。此外,登入網址等超出容器邊界的文字不會在畫面重繪時遺失前幾欄內容,登入後首度啟動工作階段(session)時由伺服器管理的企業公告 companyAnnouncements 也會正常顯示。

官方原文

Added a keyless sign-in under /login → Anthropic Console: "Sign in with your Console account" (recommended) alongside creating an API key, so organizations that don't allow API keys can sign in

Fixed text that hangs outside its container (for example the sign-in URL in /login) losing its leading columns when another part of the screen repaints

Fixed server-managed companyAnnouncements not showing at startup in a session that began with signing in (for example the first launch after /logout)

Improved /login over SSH: the sign-in URL appears immediately, pressing c reports how the URL was copied instead of always claiming success, and a hint explains how to select text in fullscreen

10

子代理運行模型透明化,背景任務喚醒與視圖修復

⟦就像工地的派工白板,看板上明確標註每位副手使用的是哪一款精密機具與出力等級。⟧ 派遣子代理處理任務時的狀態掌握度更上一層樓。現在輸入 /tasks 或打開代理詳細對話框時,清單會明確列出每個子代理運行的模型名稱以及思考努力等級(effort level)。如果背景子代理正在等待它指派的最後一個背景 Bash 指令執行,系統修復了指令完成後子代理未被喚醒的狀況,現在會如期接續後續工作。在 VSCode 編輯器中,你在 Focus 視圖中手動展開的區塊,也不會再因為子代理頻繁呼叫工具而被強制自動摺疊收合。

官方原文

Added the model (and effort level) each subagent ran on to /tasks and the agent detail dialogs

Fixed background subagents not waking when their last background Bash task completes

[VSCode] Fixed Focus view sections you expanded collapsing on their own during subagent tool activity

11

遠端外部工具斷線自動重連,桌面授權與錯誤排除

連接外部工具時的穩定性大幅提升。在非互動 -p 模式或透過 SDK 呼叫時,遠端 MCP(讓 AI 連接外部工具的協定)伺服器若遇到網路斷線,現在會自動嘗試重新連線。重試失敗後系統會明確回報錯誤,工作階段(session)不再永久失聯。針對支援用戶端中繼文件之服務如 Linear,修正了從桌面版應用程式啟動 MCP 登入時跳出重新導向網址無效的錯誤。若使用者的 ~/.claude.json 設定檔中包含格式錯誤的 MCP 伺服器項目,輸入 /status 時會清楚印出出錯的檔案路徑,不再顯示缺少檔名的空白提示。⟦類似重要專線遇到線路瞬斷時會主動自動重撥,通訊錄遇到錯誤條目也會精確指明檔案位置。⟧

官方原文

Fixed remote MCP servers in non-interactive (-p) and SDK sessions never recovering after a dropped connection; they now reconnect automatically or report as failed

Fixed MCP server sign-in started from the desktop app failing with "Invalid redirect URI" on servers that support client ID metadata documents (for example Linear)

Fixed /status showing "Found invalid entries in: ." with no filename when ~/.claude.json has an invalid MCP server entry

12

外掛市集相依性正確解析,重載語言工具安全預警

開發自訂外掛(plugin)時的除錯體驗更為流暢。當你透過 --plugin-dir 參數同時載入多個外掛時,修正了宣告 marketplace 欄位的外掛相依性永遠無法解析的問題,現在本機相依套件能正常關聯。執行 /reload-plugins 指令時,若停用了最後一個支援 LSP(語言伺服器協定,提供程式碼定義跳轉與補全的服務)的外掛,系統會確實卸除殘留的 LSP 工具。同時,若外掛變更會引發重新讀取整個對話紀錄,指令會在執行前主動跳出安全警告,避免讀取流程被無預警中斷。⟦彷彿工具箱在更換模組時能正確卡緊相依配件,並在卸下舊工具或重整抽屜前主動發出提醒。⟧

官方原文

Fixed plugin dependencies declared with a marketplace field never resolving when both plugins are loaded together via --plugin-dir

Fixed /reload-plugins keeping the LSP tool after the last LSP plugin is disabled; it now also warns before an LSP plugin change that would re-read the conversation

13

自動模式暫存鎖死修復,過載等候與初始權限修正

⟦就像車輛的自動巡航功能,不會因為先前路況管制快取了暫存停用標記,就在路況恢復後繼續把功能鎖死。⟧ 讓 Claude 自行執行任務的自動模式(auto mode,讓 AI 不逐一詢問就自主執行工具的模式)修復了多項卡住問題。以前若伺服器端曾暫時停用該功能並被暫存,後續特徵旗標抓取失敗時會導致自動模式永久不可用,現已排除此問題。當 API 短暫過載並要求重試時,自動模式呼叫工具在等候約 1 分鐘後不會再被錯誤判定為暫時無法使用而直接拒絕。在 VSCode 擴充套件中,剛安裝完成或尚未抓取特徵旗標前啟動的工作階段(session),也會正確採用你自訂的預設模式或自動模式,不再強制退回預設權限模式。

官方原文

Fixed auto mode staying unavailable at startup when a temporary server-side disable was cached and later flag fetches failed

Fixed auto mode tool calls being denied as "temporarily unavailable" after about a minute of waiting when the API was briefly overloaded and asked the client to retry

[VSCode] Fixed sessions started before feature flags were first fetched (for example right after install) opening in the default permission mode instead of auto mode or your configured default mode

14

歷史工作階段無限滾動,暫存傳送與通知修復

接續過往對話的操作體驗更為順暢。輸入 /resume 挑選歷史對話時,清單不再受限於最近 50 個工作階段(session),現在只要向下捲動就會持續載入更多對話記錄。當你使用 claude --teleport <session> 指令傳送至其他工作階段時,若當前目錄有未提交的程式碼變更,系統會主動詢問是否將變更放入 stash 暫存並繼續,不再直接退出程式。針對雲端工作階段,在對話中途重啟後,若有未完成的掛鉤(hook,特定事件觸發的小程式)或背景任務通知,系統會以正常的接續訊息送出,不會再誤把通知內容當成使用者的提示詞。⟦這好比翻閱無限延伸的檔案抽屜,在跨機器搬移文件前主動提示將未歸檔草稿放入暫存夾。⟧

官方原文

Fixed /resume only listing the 50 most recent sessions; the picker now loads more as you scroll

Fixed cloud sessions resuming after a mid-turn restart with a pending hook or background-task notification re-sent as the prompt instead of the normal continuation message

Fixed claude --teleport <session> exiting on uncommitted changes instead of offering to stash them and continue, as the session picker already does

15

終端機歷史搜尋防毀損,對話改名與按鍵修正

命令列介面的各項互動細節獲得全面修復。輸入 /clear 清除對話畫面時,先前透過 /rename 設定的自訂工作階段(session)名稱會完整保留在提示列中,不再意外消失。當歷史檔 ~/.claude/history.jsonl 中混入損毀項目時,按 Ctrl+R 搜尋歷史或按方向鍵上鍵不會再崩潰中斷,能穩定瀏覽其他指令。在支援特殊按鍵編碼(例如 modifyOtherKeys 或 kitty 協定)的終端機裡,修正了按 Ctrl+[ 無法退出 Vim 插入模式的問題。此外,緊接在 Emoji 表情符號後方輸入的錯字,拼字檢查 spellcheck 現在也能正確標上紅色底線。⟦其概念有如翻開厚實筆記本抽換內頁時,封面標籤依然完好留存且自動跳過字跡破損的歷史頁面。⟧

官方原文

Fixed spellcheck not underlining a misspelled word typed directly after an emoji

Fixed /clear removing the /rename session name from the prompt bar even though the name was kept for the new session

Fixed Ctrl+R history search and up-arrow history breaking when ~/.claude/history.jsonl contains a malformed entry

Fixed Ctrl+[ not leaving vim INSERT mode in terminals that encode modified keys (modifyOtherKeys / kitty protocol)

16

容器跨工作階段通訊修復,收件通訊端逾時釋放

⟦就像大樓住戶專用的對講機系統,即使住戶身處非 root 獨立隔間內也能正常通話,且佔線超過 30 秒未說話就會自動切斷以釋放線路。⟧ 多對話協作的通訊管道現在更穩健了。在 2.1.232 版進行通訊端資料夾強化後,使用者命名空間與無 root 容器內的跨工作階段(session)傳訊功能曾被默默關閉,這次修復徹底解決了此問題。同時,跨工作階段收件匣的通訊端(socket)機制加入防護,若連線進入後在 30 秒內未傳送任何完整的行,系統會自動中斷該連線,因此發送資料的腳本應在資料準備完畢後再建立連線。

官方原文

Fixed cross-session messaging silently turning off inside user namespaces and rootless containers after the 2.1.232 socket-directory hardening

Changed the cross-session messaging inbox socket to close connections that send no complete line within 30 seconds; scripts posting to it should connect once their data is ready

17

遠端遙控環境中斷自動恢復,跨機器提示更清晰

遠端操控對話時的連線韌性顯著提升。當伺服器在中途遺失環境時,執行 claude remote-control 不會再直接退出而丟下連線中的遠端工作階段(session),現在具備自動恢復機制。針對非管理員或擁有者角色的 Team 與 Enterprise 團隊成員,修正了停止並重啟 claude remote-control 後工作階段偶爾卡死的問題。此外,當你嘗試接續一個遠端遙控權限正被其他終端機佔用的對話時,提示訊息現在會清楚說明其他機器上的工作階段無法看見或連線至當前機器。⟦這相當於遠端連線基地台在伺服器重開時能自主重連,並在控制權被佔用時清楚標示跨機器隔離。⟧

官方原文

Fixed claude remote-control exiting and stranding attached Remote Control sessions when the server drops its environment mid-session; it now recovers

Fixed Remote Control sessions served by claude remote-control sometimes getting stuck after it was stopped and restarted, for Team and Enterprise members without an admin or owner role

Improved the notice when resuming a conversation whose Remote Control is held by another terminal: it now says sessions on other machines can't be seen from, or reach, this one

18

沙盒主動嘗試外連請求,代理大小寫相容與違規攔截

在受管網路環境下使用沙盒(sandbox)執行指令時,連線判斷更為靈活。沙盒環境中的 Bash 工具提示詞不再預先列出所有允許的網域清單,讓 Claude 能主動發起網路請求,方便你在執行當下核准新主機,避免 AI 預設未列出的主機皆被封鎖而直接放棄。當被攔截的指令依然回傳成功代碼 0 時(例如 curl 印出代理伺服器的 403 錯誤頁面),工具執行結果不會再遺漏沙盒的網路違規細節。此外,本機 IDE 連線現在同時相容大寫 NO_PROXY 與小寫 no_proxy 設定,避免本機連線誤走代理伺服器。⟦正如警衛室不再預先封閉未登記的訪客通道,而是允許訪客提出申請並由管理員當場核准放行。⟧

官方原文

Fixed the local IDE connection being routed through HTTPS_PROXY (and sometimes failing) when localhost was listed in NO_PROXY but not lowercase no_proxy; both casings are now honored

Fixed sandbox network-violation details being dropped from the Bash tool result when the blocked command still exited 0 (for example curl printing the proxy's 403 page)

Changed the sandboxed Bash tool prompt to no longer list allowed network hosts, so Claude attempts requests (and you can approve new hosts) instead of assuming unlisted hosts are blocked

19

伺服器無回應三分鐘自動重試,錯誤排版與限流重置

⟦就像撥打客服專線,若對方線路完全無聲,系統在約 3 分鐘後會主動重試一次,確定無回應便明確顯示錯誤訊息。⟧ 遭遇網路異常與額度重置時的體驗變得更加可靠。以前當 Anthropic API 完全沒有啟動回應時,工作階段(session)可能會陷入 10 分鐘以上的漫長無聲等待;現在請求會在約 3 分鐘後自動逾時並重試 1 次,若依然無回應則明確顯示 API Error: No response from API。驗證失敗、模型無法使用等用戶端產生的錯誤訊息,現在會以標準的錯誤行格式顯示,不再被誤渲染成 AI 的回覆文字。此外,當工作階段在閒置期間跨過限流視窗重置時間點,狀態列(status line,終端機最底部的即時狀態行)與 /usage 不會再殘留重置前的舊使用量百分比。

官方原文

Fixed sessions going silent for 10+ minutes when the Anthropic API never starts a response: the request now times out after ~3 minutes, retries once, then shows API Error: No response from API

Fixed auth, model-availability, and other client-generated error messages rendering like model output instead of as error lines

Fixed the status line rate_limits fields and /usage still showing a rate-limit window's pre-reset usage percentage after the window reset while the session was idle

20

代理定義格式嚴格驗證,指令替換與思考層級修正

⟦就像海關申報檢查,若旅客遞交了格式毀損或無法辨識的文件,查驗窗口會直接退回並清楚指出格式錯誤,不再假裝沒看見。⟧ 命令列參數與自動化規則的防呆驗證全面收緊。使用 --agents 參數啟動時,若傳入無效的 JSON 或格式錯誤的代理人定義,程式不再默默略過,而是會像 --mcp-config 一樣立即印出明確錯誤並退出。在掛鉤(hook,特定事件觸發的小程式)條件中,修正了類似 Bash(cat *) 的判斷條件在遇到包含 $() 或反引號指令替換時誤觸發不相干指令的問題。此外,若在關閉思考功能的狀態下設定了 xhigh 或 max 思考等級,錯誤訊息會明確指出該等級名稱、是哪項設定關閉了思考,並提示改用 /effort high 解決。

官方原文

Fixed hook if conditions like Bash(cat *) firing on unrelated Bash commands when the command contained $() or backtick command substitution followed by more arguments

Fixed --agents silently ignoring invalid JSON or invalid agent definitions; it now exits with a clear error, like --mcp-config

Improved the error when effort xhigh/max is used with thinking turned off: it now names the level, the setting that disabled thinking, and /effort high as the fix