usage

Claude Code 2.1.212

工具與目錄
在這頁

新功能 5 項

01

對話分身自動掛名,跑腿小幫手分家

你請 Claude 改報告磨了半小時,它摸熟你的想法了,這時又想順便生一版簡報。插話問,討論會變大雜燴;開新對話,它又什麼都不記得,得重講半小時。這正是打「/fork」的時刻(原意是叉子,因為它像樹枝分岔,從目前對話分出一條新枝)。打下去,Claude 把聊到現在的內容整份複製給分身,成為獨立的「背景工作階段」(background session,丟到背景自己繼續跑、不用你盯著),帶著全部記憶去做簡報;你留在原地改報告。分身就像交出去的外送單:在「claude agents」清單自成一列,沒取名字就自動拿你交代的那句話當名字,一眼認出誰是誰。「查一下這個詞」這種要等答案才能繼續的小事,交給「/subtask」(子任務)。它是原本「/fork」順便叫出的內建子代理(subagent),這次分了家——就像外送平台把「叫外送」跟「請店內夥計跑腿」分成兩顆按鈕,你再也不會按錯。

官方原文

/fork now copies your conversation into a new background session (its own row in claude agents) while you keep working; the in-session subagent it used to launch is now /subtask

Changed /fork to name the copy after your prompt when the session has no title, so the row is recognizable in the agent view

02

刪掉的對話找得回來,分身做完會回報

派出去的分身,現在更難搞丟、也更會回報。昨天手滑刪掉的對話,今天又想接著用?在代理畫面輸入「/resume」(恢復),過去的工作階段都會列出來讓你挑——連從清單手動刪掉的都找得回來,選了就丟回背景接著跑,像取消的外送單還能重新派送。兩個會讓分身出狀況的毛病修好了:以前分身碰上寫入失敗,會失去跟主線對話的保護;剛停掉的分身重開,偶爾也不吭聲就失敗——現在重開要嘛直接成功,要嘛講清楚原因、讓你強制重開。你中途點開一個還在開機的分身,也不再對著空白畫面乾等,會先看到整理好的對話紀錄。分身做完事而你正閒著時,左下角提示字會跳「N done」(N 件完成)閃一下提醒你。就像每位外送員送達都會回報,你不用一直開門張望。

官方原文

Typing /resume in the agent view now opens a picker of past sessions — including sessions deleted from the list — and resumes your pick as a background session

Fixed background sessions created with /fork losing their live-parent protection after a state write failure

Fixed reopening a stopped background session from the agent view failing silently — it now resumes the session, or shows why it can't and lets you force a restart

Improved background agent attach: cold-attaching now instantly shows the formatted transcript while the session boots, instead of a blank wait

Changed the ← footer hint to pulse N done for a moment when a background agent finishes while nothing needs your input

03

auto-mode 加裝煞車,失控前先喊停

你是否曾遇過自動模式(auto-mode)失控?當 Claude 陷入瘋狂搜尋或無限開啟子代理(subagent)的迴圈時,荷包可能瞬間大失血。現在系統加裝了跳電保護。單一工作階段(session)的網頁搜尋與子代理數量預設限制在 200 次,一旦超標就強制中斷,打「/clear」可重新計數。如果遇上運行超過 2 分鐘的 MCP(Model Context Protocol,讓 AI 連接外部工具的協定)指令,也會自動移到背景執行,不讓畫面卡死。若要回復乾淨的預設值,這正是你輸入「claude auto-mode reset」的時刻,系統會先詢問確認,加上「--yes」就能直接跳過。像家裡裝了無熔絲開關,一個插座短路只會跳開它,不會燒毀整棟房子。

官方原文

Added claude auto-mode reset to restore the default auto-mode configuration, with a confirmation prompt (pass --yes to skip)

Added a session-wide limit on WebSearch tool calls (default 200, tunable via CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION) to stop runaway search loops

Added a per-session cap on subagent spawns (default 200, override with CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION) to stop runaway delegation loops; /clear resets the budget

MCP tool calls running longer than 2 minutes now move to the background automatically so the session stays usable; configure the threshold or disable with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS

Fixed auto-mode denial notifications rendering broken characters when a long denial reason was truncated mid-emoji

04

換模型與傳訊更即時,講話變輕量

呼叫 AI 總是花大把冤枉錢,而且中途換模型還要等下一輪才生效?這批更新讓傳送指令更即時且省錢。現在提示詞快取(prompt caching,把重複提問暫存以節省成本的功能)在 Bedrock 或自訂代理端點也終於支援了。當多個代理互相對話時,訊息本體不會在歷史紀錄中重複塞兩次,節省你的 token(AI 處理與計費的文字單位)花費。在無頭模式下,當你想切換模型,這正是打「set_model」的時刻,指令會直接在下個往返當下生效。像外送軟體分清「正在送餐」與「等你確認付款」,狀態會顯示「需要輸入」,再也不會讓你乾等。

官方原文

Improved prompt caching: the mid-conversation system block now works behind LLM gateways and custom base URLs (Bedrock, Vertex, 1P)

Reduced token usage in inter-agent messaging: SendMessage bodies are no longer duplicated into replayed history and tool results

Changed headless/SDK sessions to apply a set_model control request mid-turn; the next model round-trip uses the new model instead of waiting for the next turn

Changed agent view / claude agents --json: sessions waiting on a sandbox, MCP-input, or managed-settings prompt now show as "Needs input" instead of "Working"

05

介面用詞與規則微調收尾

你想回頭查看先前的旁支對話,卻發現面板早就關掉了?這次更新針對介面用詞和核心規則進行了微調。現在,當你想要回頭翻看之前的問答時,這正是打「/btw」的時刻,它會直接幫你重開最近一次的側邊提問面板。此外,子代理預設將直接繼承主工作階段(session,工作階段為原定譯法)的權限設定。企業版的強登入限制也同步延伸至 VS Code 插件與 SDK 等各個角落。而 tmux 在舊版本下不支援同步輸出的說明也已更正。就像把說明書上印反的按鈕名稱重新校正,使用時才不會一頭霧水。

官方原文

Changed bare /btw to reopen the side-question panel on your most recent exchange so you can browse earlier answers

Deprecated the Task tool's mode parameter (now ignored); subagents inherit the parent session's permission mode by default

Changed Enterprise forceLoginMethod to be enforced for VS Code extension, SDK, setup-token, and install-github-app logins, not just the terminal

Changed session transcripts to record the reasoning effort level on each assistant message

Updated the auth status panel title from "Cloud authentication" to "Authentication"

Corrected an earlier release note (2.1.200): tmux through the 3.6 series lacks synchronized output; newer tmux with support is detected automatically

修正 6 項

06

危險指令與掛鉤失效的漏洞補齊

把鑰匙交給管家,最怕他擅自開鎖或把外人帶進家門。以前在規劃模式下,像 touch 或 rm 這種修改檔案的危險指令有時會沒問你就自己跑掉,現在已被牢牢鎖上。當你建立工作樹(worktree,Git 讓同一專案平行開多份副本的功能)時,以前會跟著連結亂跑。現在若專案藏了指向外部的符號連結(symlink,指向另一位置的捷徑檔),系統會直接擋住,防止檔案被寫到專案外。此外,當掛鉤(hook,特定事件被觸發的小程式)要求中斷時,即使工具失敗也不會再漏掉指令。甚至在收到終端終止訊號時,系統也會把背景子行程清乾淨。像保全系統補上了沒鎖好的後門,該阻擋的動作這次真的擋得住。

官方原文

Fixed plan mode auto-running file-modifying Bash commands (e.g. touch, rm) without a permission prompt or SDK canUseTool callback

Fixed worktree creation following a repository-committed symlink at .claude/worktrees, which could create files outside the repository

Fixed a continue:false hook's halt being dropped when the tool fails or completes mid-stream, and hook infrastructure errors being misreported as user rejections

Fixed SIGTERM during a running Bash tool orphaning the command's process tree in print/SDK mode; the CLI now aborts the turn, kills the tree, and exits 143

07

「/ultrareview」四個卡關一次修掉

想要進行程式碼審查,卻發現指令老是聽不懂你的意思?這次「/ultrareview」一口氣修復了四個讓你卡關的地方。以前你輸入「#123」或貼上 PR 連結時,系統常常認不出來直接報錯,現在各種寫法都吃得下去。當你指定只存在於遠端的分支時,系統也會主動去 origin 抓取,打錯字還會幫你猜最接近的名字。在「/clear」後重開的工作階段(session,工作階段為原定譯法)中,原本會被跳過的計費確認現已補回。而在桌面版應用程式遇到非 Git 儲存庫錯誤時,提示也會改為引導你切換資料夾。就像客服專線終於聽懂你的話,不再轉錯部門或忘記收費。

官方原文

Fixed /ultrareview rejecting PR references like #123, PR 123, and pasted PR URLs; error hints now name the command you actually typed

Fixed /ultrareview <branch> not fetching the branch from origin when it exists remotely; it now suggests the closest branch name on typos

Fixed /ultrareview skipping the billing confirmation in a new conversation after /clear

Fixed /ultrareview's "not a git repository" error on Claude Desktop now suggesting the project's repository folder instead of terminal commands

08

終端機操作卡頓與跑版修好了

當你在終端機裡手忙腳亂地輸入指令,卻常碰上畫面卡頓或文字折行跑版?這批修正專門治這些介面上的小疙瘩。在 Windows 上被原則擋住 PowerShell 5.1 時,後台守護行程(daemon)現改用第七版啟動。用「!」在 shell 模式輸入含路徑的指令時,不會再因為自動完成選單開著而失效。在代理畫面按 Ctrl+J 也終於能正常換行。此外,像是計畫核准對話框提示被長路徑擠爛、全螢幕縮放時歡迎畫面沒跟著變寬,以及窄版 diff 畫面行號消失等排版問題,也全部調整完畢。就像幫家裡卡卡的門鎖上了油,開關終於順了。

官方原文

Fixed /background and claude --bg failing with "EUNKNOWN: unknown error, uv_spawn" on Windows when Group Policy blocks PowerShell 5.1; the daemon now prefers PowerShell 7

Fixed shell mode (!) not executing commands containing file paths while the path autocomplete popup was open

Fixed Ctrl+J not inserting a newline in the agent view dispatch input on terminals with extended key reporting, and surfaced the newline shortcut in the ? help overlay

Fixed the plan-approval dialog footer splitting "ctrl+g to edit in <editor>" apart when the file path is long

Fixed the welcome banner keeping its old panel widths after a combined width+height terminal resize in fullscreen mode

Fixed diff previews losing their line numbers and +/- markers in narrow layouts

09

幾種讓工作階段開不起來的毛病修好了

你正在處理緊急任務,工作階段卻無預警卡死在啟動畫面?這些阻礙對話開機的疑難雜症已經被清除了。如果你的專案設定了特殊的傳輸安全性憑證(如 mTLS 或額外的 CA 憑證包),雲端代管工作階段現在會忽略這些設定並跳出警告,但保證讓你順利開機。以前如果先讀取了檔案的局部內容,在恢復工作階段(session,工作階段為原定譯法)時若編輯該檔會被誤判而擋下,這問題已修好。另外,使用繼續參數重啟後若呼叫 ExitWorktree 也會正常執行。就像大樓保全認識了更多款門禁卡,不再因為格式不同就把你鎖在門外。

官方原文

Fixed hosted (host-managed) sessions failing at startup when repository settings configured mTLS certs, extra CA bundles, or OAuth scopes; these transport settings are now ignored with a warning

Fixed a spurious "File has not been read yet" error when editing a file that had been read with offset/limit before resuming a session

Fixed ExitWorktree failing with "no active EnterWorktree session" after resuming a session with --continue/--resume in print/SDK mode

10

遙測回報與搜尋擷取的可靠度修好了

你在背景傳送監控指標或抓取網頁資料時,是否常被斷斷續續的網路錯誤打斷?這批修正提高了遙測與搜尋的可靠度。當 OpenTelemetry 匯出遇到不吃分段傳輸的 Azure 監控伺服器時,現改用傳統相容模式發送,避免被 411 拒絕。在無頭模式(headless,沒有終端機視窗/視覺介面的執行模式)下若設定了 TRACEPARENT,事件紀錄也不會再漏掉追蹤編號。而當網頁搜尋工具因流量過大回傳 API 錯誤或遭遇限流時,系統會自動在背景以漸進拉長等待的方式重試。就像客服學會分清答錄機和忙線音,遇到忙線會等一下再撥,不再直接放棄。

官方原文

Fixed OpenTelemetry HTTP exports being rejected with 411/400 by Azure Monitor and other endpoints that don't accept chunked transfer encoding

Fixed OTLP event log records missing trace_id/span_id when TRACEPARENT is set in SDK/headless mode

Fixed conversations with many images incorrectly failing with "Request too large" errors, and improved the error message to explain the actual cause

Fixed web search and web fetch returning "API Error" text as search results or page content when the API was overloaded

Improved web search and web fetch reliability by retrying 529 errors and rate-limited requests with bounded backoff

11

連線疑難雜症再修一輪

當你建立起複雜的多代理合作小隊,卻常在連線中途遭遇各種斷線或顯示空白?這批修復清理了剩餘的連線頑疾。在遠端控制(Remote Control)中途加入的客戶端,不會再看到空空如也的畫面。在串流(streaming)模式下重啟工作階段時,控制請求也不再無故消失。同時,代理小隊重新初始化時,正在關閉的隊友也不會向隊長重複發送空閒狀態。此外,修復了局部讀取後 @ 提及失效,以及退出代碼 143 造成逾時誤判等問題。就像大樓的許多零星小故障,技師一次巡完徹底解決。

官方原文

Fixed the workflow agent grid staying empty for Remote Control clients that join a session mid-run

Fixed streaming-mode control requests being marked complete before their handler finished, which could lose the request on session restart

Fixed agent teams: a stopping teammate could send the leader duplicate idle notifications when team initialization re-ran within a session

Fixed @-mentions attaching nothing after a partial file read, plugin uninstall targeting the wrong marketplace, and false "Command timed out" on exit code 143