usage

Claude Code 2.1.181

工具與目錄
在這頁

新功能 4 項

01

三個新開關:一行改設定、放行 Apple Events、坐在電腦前不收手機推播

想隨手調設定、不想被手機打擾,現在更順手了。新增 /config key=value 語法,你直接在輸入框打 /config thinking=false 就能改任何一項設定(thinking 是讓 Claude 多想一步再回答的開關),不用再翻選單;互動模式、-p 一次性指令、Remote Control(遠端遙控,用手機控桌機的功能)都通用。macOS 多了 sandbox.allowAppleEvents 選項(opt-in,預設關、要你自己打開才生效的開關),打開後被沙盒(sandbox,把程式關在限制範圍裡跑的安全機制)擋住的指令才能送出 Apple Events(macOS 程式之間互相呼叫對方做事的訊息)。還有新的 CLAUDE_CLIENT_PRESENCE_FILE 環境變數(開程式前預先塞給它的隱藏開關),指向一個標記檔,你人在電腦前時就不會再收到手機推播,免得兩邊同時響。就像家裡總遙控器多了三顆新按鈕:按一下調亮度、按一下准許某個家電互連、人坐在沙發上就自動把臥室電視關靜音。

官方原文

Added /config key=value syntax to set any setting from the prompt (e.g. /config thinking=false) — works in interactive, -p, and Remote Control

Added sandbox.allowAppleEvents opt-in setting that lets sandboxed commands send Apple Events on macOS

Added CLAUDE_CLIENT_PRESENCE_FILE environment variable: point it at a marker file to suppress mobile push notifications while you're at the machine

02

長回覆不再一次全擠出來、斷線會自己重接,底層引擎也升級

看 Claude 寫長段落的時候,文字會一行一行陸續浮現,不用再乾等第一個換行才整塊蹦出來;串流(streaming,答案一邊生成一邊逐字顯示)讀起來更順。如果它正在「思考」時連線突然斷掉,以前會直接丟一句「Connection closed while thinking」(思考時連線中斷)給你,現在會自己重試接回來,不用你手動重發。底層打包進去的 Bun 執行環境(Claude Code 跑起來所依賴的 JavaScript 引擎)也升到 1.4。就像看直播,以前訊號一斷就定格轉圈、要你手動重新整理,現在會自己接回去,而且攝影機也換了較新的一台。

官方原文

Improved streaming of long paragraphs: text now appears line-by-line instead of waiting for the first line break

Improved auto-retry: API connection drops mid-thinking now automatically retry instead of showing "Connection closed while thinking"

Upgraded the bundled Bun runtime to 1.4

03

子代理面板更清爽:閒置自動收起,計時不再算到別人頭上

你派出去的子代理(subagent,Claude 再分身去辦小事的代理)一多,面板會很亂;現在閒置的子代理 30 秒後會自動隱藏,列表最多顯示 5 列並附捲動提示,底部也會顯示鍵盤快捷鍵。計時也修正了:以前子代理的「Thinking」(思考中)顯示的其實是父代理(派它出來那隻)的累計時間,現在顯示它自己的;卡在等另一隻子代理時,面板也不再一直跳秒計時,而是老實顯示「waiting」(等待中)。就像公司布告欄,以前閒置工讀生的名條一直掛著、加班時數還會算到組長頭上,現在沒事的名條自動收起、各算各的時數。

官方原文

Improved the subagent panel: idle subagents auto-hide after 30s, the list caps at 5 rows with scroll hints, and keyboard hints now show in the footer

Fixed subagent "Thinking" duration showing the parent agent's elapsed time instead of the subagent's own

Fixed subagents blocked on a nested agent showing a ticking elapsed time instead of "waiting" in the agent panel

04

連線狀態不再騙人:MCP 連不上會誠實說、遠端遙控不再卡「連線中」

連線到底通沒通,現在看得更清楚。claude mcp get/list 以前即使抓工具清單失敗,也會硬顯示一個綠勾「✓ Connected」(已連線)騙你;現在會誠實顯示「! Connected · tools fetch failed」(連上了、但工具抓取失敗)並附上錯誤詳情。Remote Control(遠端遙控)連上後,以前會留一行沒清掉的「connecting…」(連線中)賴著不走,現在會在紀錄裡明確確認已連上。MCP 的 OAuth(一種授權登入方式)瀏覽器頁面也改成像 Claude Code 的視覺風格,成功後還會自動關掉。就像快遞追蹤,以前顯示「已送達」但其實丟在門口找不到,現在會誠實寫「送達但簽收失敗、原因XXX」,而且寄完的網頁會自己關。

官方原文

Improved the MCP OAuth browser page to match Claude Code's visual style and auto-close on success

Fixed claude mcp get/list showing ✓ Connected when tools/list fails; they now show ! Connected · tools fetch failed with the error detail

Fixed /remote-control leaving a stale "connecting…" line; it now confirms in the transcript once connected

修正 6 項

05

開機更利落:啟動變快、不再空白卡 15 秒、不再崩潰或凍結

打開 Claude Code 變快也更穩了。一個從 2.1.169 版不小心引進、每次在新環境啟動多耗約 120ms(毫秒,千分之一秒)的小延遲修掉了:沒設 MCP 伺服器(MCP server,Claude 連接外部工具的橋樑)時,第一個問題不再傻等遠端設定下載。帳號設定在爛網路下抓很慢時,以前會讓終端機空白卡到 15 秒,現在不再卡。.claude.json(Claude 的設定檔)裡如果混進壞掉的 null 專案紀錄,以前啟動會直接崩潰報 TypeError: Cannot read properties of null,現在撐得住。macOS 上 Spotlight(系統搜尋)正在重新索引時,以前工作階段一開始整個介面會凍結、連 Ctrl+C 都沒反應,現在也不會了。就像車子發動,以前冷車時要乾等、儀表板偶爾當機或亮故障燈,現在轉一下就順順發動。

官方原文

Fixed a startup regression (~120ms per launch in fresh environments, introduced in 2.1.169): the first prompt no longer waits for the managed-settings fetch when no MCP servers are configured

Fixed startup blocking with a blank terminal for up to 15 seconds when the account settings fetch is slow on a degraded network

Fixed startup crash (TypeError: Cannot read properties of null) when .claude.json contains corrupted null project entries

Fixed macOS TUI freezing at session start (Ctrl+C unresponsive) when Spotlight is busy reindexing

06

憑證不再每分鐘重抓、快取讀得到、檔案不再寫成 0 byte

幾個會讓你多花時間或掉資料的連線與檔案問題修好了。AWS 的 awsCredentialExport 憑證(credentials,證明你是合法使用者的金鑰)如果快過期,以前會每分鐘狂刷新一次,現在也接受 aws configure export-credentials 吐出的 JSON 格式。自訂 ANTHROPIC_BASE_URL(自己架的 API 接點)和 Foundry(企業版通道)上,prompt caching(提示詞快取,把重複內容快取起來省錢省時的機制)以前因為每輪都變的 attestation token(驗證記號)而讀不到快取,現在讀得到了。Write/Edit 寫檔到網路磁碟或雲端同步資料夾時,以前會寫出 0 byte 或被截斷的壞檔,現在正常。另外,當另一個 Claude Code 行程(process,同時跑的另一份程式)在背景跑 30 天清理時,你這邊掛很久的閒置工作階段不會再莫名丟掉歷史紀錄。就像銀行,以前存摺每分鐘被重印一次、優惠券掃不出來、轉帳偶爾變空白紀錄,現在都正常了。

官方原文

Fixed AWS awsCredentialExport credentials with a short remaining lifetime causing credential refreshes every minute, and now accepts the JSON shape from aws configure export-credentials

Fixed prompt caching not reading on custom ANTHROPIC_BASE_URL and on Foundry due to a per-request attestation token changing every turn

Fixed Write/Edit producing 0-byte or truncated files on network drives and cloud-synced folders

Fixed long-running idle sessions losing their history when another Claude Code process ran the 30-day transcript cleanup

07

換模型立刻生效、子代理不再無限連鎖、重試提示不再賴著不走

切換模型跟派工的幾個邏輯修順了。你用 /recap(回顧對話的功能)或開分支(fork,把對話複製一份另開的動作)時,以前剛換完模型會還在用舊模型跑一輪,現在立刻用新模型。前景子代理以前會無限制地一直生出巢狀子代理(一層包一層),現在跟背景子代理一樣遵守 5 層深度上限。還有,API 重試時那行「Retrying in 0s · attempt N/10」(0 秒後重試・第 N/10 次)以前重試成功後還黏在畫面上,現在成功就消失。就像換了新廚師,以前還會讓舊廚師再炒一道才交棒;學徒以前會無限互相推工作,現在最多推五層;而且「重做中」的牌子做好菜就會拿掉,不會一直掛著。

官方原文

Fixed foreground subagents spawning unbounded nested chains; they now respect the same 5-level depth limit as background subagents

Fixed /recap and conversation forks using the previous model immediately after a model switch

Fixed the API retry indicator ("Retrying in 0s · attempt N/10") staying on screen after the retry succeeded

08

macOS 授權、Windows、符號連結設定檔都不再出錯

不同平台跟特殊設定下的幾個地雷拆掉了。macOS 上用 open、osascript 或瀏覽器登入的授權流程(auth flow,登入拿權限的一連串步驟)以前會失敗並報 error -600,原因是少了 Apple Events entitlement(蘋果允許程式互相呼叫的正式許可),現在補上了。Windows 上 ExitWorktree(退出工作樹的功能)以前因為找不到純 git 指令、會用「Could not verify worktree state」拒絕刪掉乾淨的工作樹(worktree,同一專案多開平行副本的 Git 功能),現在能正常移除。當 ~/.claude/settings.json 是放在另一個符號連結(symlink,像捷徑一樣指向別處的檔案)底下的相對符號連結時,/effort、/model 這類設定變更以前會報 ENOENT(找不到檔案的錯誤),現在正常。Windows/OneDrive 上 agents 目錄(放自訂代理的資料夾)已存在時,建立代理以前會報「EEXIST: file already exists」,現在也能建立。就像裝潢,以前某幾種牆面釘釘子就整面報錯,現在不管實牆、隔間板、還是已經有釘孔的牆都能正常施工。

官方原文

Fixed open, osascript, and browser-based auth flows failing with error -600 on macOS by adding the Apple Events entitlement

Fixed ExitWorktree refusing to remove a clean worktree with "Could not verify worktree state" when bare git cannot be resolved on Windows

Fixed settings changes (such as /effort or /model) failing with ENOENT when ~/.claude/settings.json is a relative symlink under a symlinked ~/.claude

Fixed agent creation failing with "EEXIST: file already exists" when the agents directory already exists (Windows/OneDrive)

09

複製貼上不再出包:Ctrl+C 不覆蓋剪貼簿、Ctrl+V 文字貼得出、Linux 也能複製

剪貼簿(clipboard,系統暫存你要複製內容的地方)三個毛病修好了。全螢幕模式下,如果你先用滑鼠加了修飾鍵拖曳(modifier+drag,像按著某鍵再拉選)選了一段終端機原生選取範圍,再按 Ctrl+C,以前會把你應用程式裡舊的選取內容蓋進剪貼簿,現在不會。Ctrl+V 在剪貼簿裡是文字時,以前會顯示「No image found in clipboard」(剪貼簿找不到圖片)而不貼上,現在會正常貼上文字。Linux 上 /copy 和選取即複製(copy-on-select)以前偵測不到「Claude Code 啟動後才裝的」剪貼簿工具,現在能偵測到了。就像影印機,以前按複製會把上一份蓋掉你的、放純文字卻堅持要找圖片、而且新裝的紙匣它認不得,現在都正常了。

官方原文

Fixed Ctrl+C in fullscreen after a native terminal selection (modifier+drag) overwriting the clipboard with the app's prior selection

Fixed Ctrl+V showing "No image found in clipboard" instead of pasting when the clipboard contains text

Fixed /copy and copy-on-select on Linux not detecting a clipboard utility installed after Claude Code started

10

一批畫面細節修順:行號、縮排預覽、問卷對話框、日期、跑馬燈都對齊

一堆影響閱讀的小顯示問題修好了。IDE(編輯器外掛,像 IntelliJ、VS Code)選取的行號在提醒訊息裡以前會差一,現在準了。Write 建檔預覽裡用 Tab 縮排的程式碼以前縮排顯示錯誤,現在正確。AskUserQuestion(Claude 反過來問你問題的功能)的預覽內容以前會在對話框邊緣被截斷,現在會自動折行;多選題裡你手打的「Other」(其他)自由作答以前送出會被默默丟掉,現在保留。/stats(統計功能)的「Most active day」(最活躍那天)和每日 token(用量計量單位)圖表在 UTC 負時區(比世界標準時間慢的地區,如美洲)以前會早一天,現在準了。全螢幕下要開網址現在得 Cmd+click(macOS)/Ctrl+click,跟原生終端機一致。Improved N memories(更新了幾則記憶)那行在非詳細模式下不再逐字列出檔名。排隊等你這輪結束的輸入訊息現在會顯示整條背景高亮。Ghostty(一款終端機軟體)上轉圈動畫的脈衝以前會停在錯誤的字元大小,現在正常。就像一份排版粗糙的報告,行號錯一格、表格超出邊界、日期早一天、連載入動畫都忽大忽小,現在全部對齊了。

官方原文

Changed fullscreen mode URL opening to require Cmd+click (macOS) / Ctrl+click, matching native terminal behavior

Changed the Improved N memories line to no longer list individual files outside verbose mode

Fixed IDE selection line numbers in context reminders being off by one (IntelliJ and VS Code)

Fixed AskUserQuestion preview content being cut off at the dialog edge instead of word-wrapping

Fixed AskUserQuestion multi-select questions silently dropping a typed "Other" free-text answer when submitting

Fixed /stats "Most active day" and daily token chart dates showing one day early in UTC-negative timezones

Fixed tab-indented code rendering with incorrect indentation in the Write (create-file) preview

Fixed user prompts queued mid-turn not showing a full-width background highlight in the transcript

Fixed the activity spinner's pulse dwelling on the wrong glyph size in Ghostty