Claude Code 2.1.329
新功能 20 項
打開資料夾與對話時會先提醒 hook 狀況
打開陌生資料夾,你怎麼確定裡面沒有藏著會自動執行的腳本?進到信任確認畫面時,現在會直接寫明這個資料夾的 hook(掛鉤,特定事件發生時被觸發的小程式)宣告在哪裡。
如果你在 Claude Desktop 或其他非互動式環境工作,遇到管理設定裡的 hook 載入失敗,對話裡也會直接跳出警告通知你。
像進租屋處簽約前,房東把電錶箱與門鎖開關標得清清楚楚,哪條線路上不了電也會貼條通知,不用等你搬進去才自己摸黑猜。
官方原文
Added a trust dialog warning that says where a folder's hooks are declared
Added a warning in the conversation, in Claude Desktop and other non-interactive hosts, when hooks in managed settings fail to load
/tasks 納管排程並統一背景任務計數
對話跑著跑著,背景常同時掛著定時提醒與各類執行項目,以前總散在不同角落。輸入 /tasks 後,清單現在會把目前工作階段的排程任務、/loop 喚醒項目、目標以及對話分岔全部列進來,選中某項按 x 確認後就能停掉它。
清單標題與底部背景計數已整合成單一數字。裡面包含終端機指令、監控腳本、MCP(讓 AI 連接外部工具的協定)呼叫、代理、工作流與排程任務。
如同機場把登機門廣播、行李轉盤與接駁車動態收進同一面出發總表,抬頭掃一眼總數,想取消哪一班也能當場抽單。
官方原文
Added this session's scheduled tasks, /loop wakeups, the goal and this conversation's forks to /tasks; x stops one after asking
Changed the /tasks header and the footer's background count to one number covering shells, monitors, MCP calls, agents, workflows and scheduled tasks
排程任務在重開與離開時的執行規則調整
更新後重開新的登入工作階段,舊版存下來的排程任務多半需要重新設定排程。不過如果你用 --resume 接回原本的工作階段,它們還是會照常跑。
選用「Exit and stop tasks」時,現在會真正結束這個工作階段的排程任務,下次恢復對話時不會再自己啟動。唯一例外是你在 Claude 還在回覆時就離開,任務才不會被停掉。
跟鬧鐘改版一樣,另開一個已登入的新工作階段得重新勾選提醒時段,但接回舊時光軸依然會響;親手按掉「離開並停止任務」後,下次翻開紀錄也不會再突然鈴聲大作。
官方原文
Changed saved scheduled tasks: in new signed-in sessions, most saved by earlier versions need scheduling again, though --resume of their own session still runs them
Changed 'Exit and stop tasks' to end this session's scheduled tasks so they don't run again on resume, unless you exit while Claude is responding
Stop 掛鉤改將監控腳本標為 monitor
給有設定 Stop 與 SubagentStop hook 的使用者或開發者,這裡有個分類調整。當你的腳本讀取背景任務清單時,由 Monitor 執行的腳本現在會標成 monitor,不再歸類成 shell。
官方原文
Changed Stop and SubagentStop hooks to list a Monitor's script as monitor, not shell, in background_tasks
Code Mode 啟用條件放寬與停用方式調整
想讓 Claude 自己寫腳本串接工具來跑的 Code Mode,過去遇到監控或特定模組就會被默默關掉。現在就算開啟 OpenTelemetry 事件與指標,Code Mode 也能啟用,腳本裡每次呼叫工具都會送出事件;只有開啟追蹤功能時仍會維持關閉。
就算關掉了遙測、非必要流量或功能旗標,Code Mode 一樣能啟動。如果管理員想明確停用,改由受管理的設定檔去關閉即可。
只列出部分工具的模組,也不會再悄悄把 Code Mode 關掉,想停用同樣要靠管理員設定控制。
打個比方,以前天文台只要氣象感測沒全接上就不開圓頂,現在就算拔掉幾條回報線也能觀星,真的不想開放得由館長親手下鎖。
官方原文
Added support for turning on Code Mode while OpenTelemetry events and metrics are enabled; each tool call the code makes sends its events; tracing still keeps it off
Changed Code Mode to also start when telemetry, nonessential traffic or feature flags are turned off; an administrator can keep it off in managed settings
Fixed mods that list only some tools silently turning Code Mode off; such a mod no longer keeps it off, so use managed settings for that
Code Mode 腳本限制與掛鉤行為對齊一般模式
寫進 Code Mode 腳本裡的規則,現在跟一般對話操作越來越一致了。PreToolUse hook 如果出錯,不再直接擋下腳本裡的工具呼叫,跟一般模式相同。若在指令、HTTP 或 MCP 工具的 hook 上遇到失敗必須擋下,請加上 "onFailure": "block"。
腳本內如果自己宣告了 log、preview 或 sleep 這幾個名稱,以前會被直接拒跑,現在可以正常執行。
在 Code Mode 裡啟動子代理後,Claude 收到的等待指引也跟一般模式看齊,不再各走各的規則。
換成考場來看,內外原本各有兩套作答規矩,現在把錯題不倒扣、可用字詞跟交卷等待方式全對齊,真要嚴格擋下再另外標記。
官方原文
Changed Code Mode so a PreToolUse hook that errors no longer refuses a script's tool call, as outside Code Mode; set "onFailure": "block" on a command, HTTP or MCP tool hook that must refuse
Changed Code Mode to run a script that declares its own log, preview or sleep, which it used to refuse
Improved Code Mode: after starting a subagent, Claude now gets the same guidance on waiting as outside Code Mode
Code Mode 記憶體控管與大檔讀取上限
讓 Code Mode 處理大檔案或跑長腳本,電腦比較不容易被拖垮。
腳本陷入無止境迴圈時,現在會在達到上限後自動停下,不再把整台機器的記憶體塞爆。
讀過的大型文字檔不再全部留駐在記憶體裡,背景子代理每次被喚醒時記憶體也不會持續膨脹。
腳本一次嘗試讀取超過 256 MiB 的行數範圍會被直接拒絕,避免吃掉幾 GB 的記憶體;讀取超長單行時逾時的問題也修好了。
當腳本執行上千次工具呼叫後,終端機畫面卡住不動的時間也縮短很多。
官方原文
Fixed a runaway loop in Code Mode filling the machine's memory; it is now stopped at a limit
Fixed Code Mode keeping in memory every large text file that code read, and memory growing each time a background subagent was woken
Improved Code Mode: the terminal freezes for far less time after a script makes thousands of tool calls
Changed Code Mode to refuse a script's read of a line range over 256 MiB, which could use gigabytes of memory, and fixed reads of very long lines timing out
/status 顯示市集更新狀態與模型細節
想知道目前套了哪個模型、又有哪些市集沒在自動更新嗎?輸入 /status 後,畫面新增了「Marketplace auto-update」一欄,直接點名不會自動更新的受管理市集並說明原因。
規劃模式下跑 /status 時,現在也會明確寫出 opusplan 與 haiku 各自實際使用的模型名稱。
在 /model 選單裡,如果 Default 那一列本來就顯示你儲存的模型,點選它時不再被組織的預設模型覆蓋。
看懂這點就像翻手機電信帳單,明細表現在會直接寫清哪項服務沒開自動續約、目前實際跑哪套網路方案,選回預設也不會偷換成團體合約。
官方原文
Added a "Marketplace auto-update" row to /status that names managed marketplaces that get no automatic updates, and why
Fixed choosing Default in /model replacing your saved model with your organization's default when the Default row already showed your saved model
Fixed /status not naming the model that opusplan and haiku use in plan mode
自架執行器調整倉庫複製路徑與資料夾規則
管理 Self-hosted runner 的機器磁碟與掛載規則,有幾項資料夾路徑變動要留意。
同一個擁有者與倉庫名稱若來自第二個主機名稱,新的複製檔會放進基礎資料夾底下的 _repos/clones/<host>/,既有的複製檔不會搬動。
網址路徑含有特殊字元的倉庫,現在會改在新的資料夾重新複製。原本指定舊資料夾的規則與磁碟掛載區不再套用,舊資料夾本身則會留在原地。
啟動時若加上 --capacity 1,--repository-folder 可以接納基礎資料夾內大多數的資料夾。容量大於 1 時,若將 --repository-folder 指向基礎資料夾內的這類資料夾,會停止啟動。若有其他倉庫的工作階段重疊到該資料夾也會被拒絕。
官方原文
Self-hosted runner: Changed a second host name's clone of the same owner/name to go under _repos/clones/<host>/ in the base folder; no clone moves
Self-hosted runner: Changed repositories with unusual characters in their address path to clone anew in a new folder; rules and volumes naming the old one stop applying, and the old clone stays put
Self-hosted runner: Changed --repository-folder to take most folders in the base folder at --capacity 1 (above 1, one there stops start-up); another repository's session overlapping one is refused
長時間對話、Desktop 與背景的記憶體瘦身
跑久了編輯大量檔案或開著遠端連線,電腦記憶體比較不容易越吃越多。
背景執行的終端機指令,不會再在結束前一直抓著早期對話的記憶體不放。
在 Claude Desktop、各款 IDE 或 SDK 執行的工作階段裡,對話經過壓縮或執行 /clear 後,Remote Control 也不再繼續佔用早期對話的記憶體。
在編輯過大量檔案的長工作階段,以及 macOS 和 Linux 上累積許多大型 MCP 工具結果的 Claude Desktop 長工作階段中,記憶體用量都降低了。
閒置的 Claude Desktop 與 SDK 工作階段在長回合結束後,或是用 --resume、--continue 接回帶有截圖或大型工具結果的工作階段時,佔用的記憶體也更少。
官方原文
Fixed background shell commands using memory for the earlier conversation until they exit
Fixed Remote Control using memory for the earlier conversation after a compaction or /clear in sessions run by Claude Desktop, IDEs or the SDK
Improved memory use in long sessions that edit many files, and in long Claude Desktop sessions on macOS and Linux with many large MCP tool results
Improved memory use of idle Claude Desktop and SDK sessions after a long turn, and after --resume or --continue of a session that holds screenshots or large tool results
自動模式減少檢查加速並優化放行規則
開著自動模式讓 Claude 自己動手,現在少了幾道多餘的等待與誤擋。
自動模式減少了執行 git status 的頻率,大型專案裡多數請求的等待時間都變短。不過會直接捨棄修改內容的 git 指令仍可能先被擋下,直到工作目錄檢查過為止。
執行 /auto-mode-setup 掃描專案建議規則時,會參考近期的自動模式拒絕紀錄,也可能據此提出放行規則建議;每條都會先讓你確認,再儲存。
使用 rm 刪除指向工作目錄外或指向自己的 symlink(符號連結,指向另一個位置的捷徑檔)時,不再跳出人工確認。
關閉遙測、透過閘道連 Anthropic API 或使用 Microsoft Foundry 時,對「yes」這類簡短回覆的處理更準確。
雲端工作階段請求失敗後,也不再指示 Claude 去執行會被自動模式擋下的網路代理檢查。
官方原文
Fixed auto mode asking for manual approval to rm a symlink that points outside the working directory or at itself
Fixed /auto-mode-setup ignoring recent auto mode denials when it scans a project for rules to suggest; it may now offer allow rules from them, and you review each before it's saved
Fixed cloud sessions telling Claude to run a network proxy check after a failed request, which auto mode then blocked
Improved auto mode's handling of a short reply such as "yes" to Claude's question when telemetry is off, behind a gateway to the Anthropic API, or on Microsoft Foundry
Changed auto mode to run git status less often so most requests wait less in large repositories; a git command that discards changes may be blocked until the working tree is checked
Remote Control 狀態同步與切換速度改善
用手機或網頁端遠端操控電腦上的工作階段,畫面資訊跟操作節奏都更對得上了。
Remote Control 工作階段重啟後,不會再退回最初的思考力度,卻還在 App 上假裝顯示你原本選的等級。不過一開始就在 Ultracode 啟動的工作階段目前還不適用。
在 claude remote-control 工作階段裡用 /rename 改名,或是透過 UserPromptSubmit hook 設定的標題,現在都會如實顯示在 claude.ai 與手機端。
當分支把某個檔案改名後又接著編輯它時,Remote Control 的差異清單不會再把同一個檔案列兩次。
開啟 Remote Control 的 Claude Desktop Code 工作階段,在回答完畢後準備好接收下一則訊息的速度也變快了。
官方原文
Remote Control: Fixed sessions going back to their first effort level after a restart while the app still showed the level you picked (not yet for sessions that start in Ultracode)
Fixed /rename and UserPromptSubmit hook titles in claude remote-control sessions not showing on claude.ai and mobile
Fixed the Remote Control diff listing a file twice when the branch renamed it and it was then edited
Improved how fast a Claude Desktop Code session with Remote Control on is ready for the next message after an answer
設定畫面防卡死、重啟等登入與舊對話清理
進出工作階段與重啟介面,現在少了不少卡住或無故被登出的煩惱。
當 --resume 選單、信任確認對話框或其他設定畫面正等著你操作時,核准受管理設定後不再卡在一片空白畫面動彈不得。
執行 /tui 或其他就地重啟動作時,現在會短暫等待登入狀態重新整理完畢,比較不會因此把你登出。
在套用受管理設定的電腦上,自動清理舊工作階段的動作也改善了。
官方原文
Fixed an empty, frozen screen after approving managed settings while the --resume picker, the trust dialog or another set-up screen was waiting
Improved the automatic clean-up of old sessions on computers with managed settings
Improved /tui and other in-place restarts to wait briefly for a login refresh, so they are less likely to sign you out
Windows 搜尋程式啟動慢的電腦等待縮短
你在 Windows 上打開 Claude Code 準備開工,或是要做第一筆查詢,如果裡頭的檢索工具起步比較費時,過去常會卡住一陣子。現在啟動與首次搜尋的等待時間縮短了。
官方原文
Windows: Improved start-up and the first search on PCs where Claude Code's search program starts slowly
macOS 電腦操控套用新安全規則與逾時上限
讓 Claude 直接幫你操作 macOS 畫面,安全界線與等待時間都有新規定。電腦操控功能已更新到較新的安全規範,部分動作會被拒絕執行,某些應用程式能取用的範圍也縮減了。
要由它開啟某個應用程式時,若超過 30 秒還沒啟動完成,它就會直接放棄,不會一直乾等下去。
好比請鄰居小孩幫忙進屋按家電開關,現在多了幾道鎖住不准碰的抽屜,超過 30 秒還轉不開的舊水龍頭也會直接放手,不再傻等。
官方原文
Updated computer use on macOS to newer safety rules, so some actions are refused and some apps have less access
Changed computer use on macOS to give up on an app launch that has not finished after 30 seconds
Gateway 空白名單啟動改為每次框出警語
架設 Gateway(閘道器,轉發流量的入口服務)時,如果 access_control.allow_cidrs 允許清單留空,原本的啟動警告改成每次啟動都會出現。這則提醒在純文字紀錄裡會用方框框起來:絕對不要把 Gateway 直接暴露在公開網際網路上。
跟店面每天開門一樣,只要還沒設定誰能進來,一拉開鐵門就會在日誌裡印出框起來的提醒「別把大門對著大街敞開」。
官方原文
Gateway: Changed the start-up warning shown while access_control.allow_cidrs is empty to a notice at every start, boxed in text logs: never expose the gateway to the public internet
移除 max_tokens 錯誤的自動重試機制
你送出的請求若撞上 max_tokens 限制,2.1.326 原本會依報錯訊息列出的上限再送一次。這一版已取消這個作法。
如果你的閘道後方模型能接受的輸出 token(AI 處理與計費的文字單位)較少,請自行將環境變數 CLAUDE_CODE_MAX_OUTPUT_TOKENS 設為該上限值。
就像貨車超重被攔下時,以前車隊會照告示牌上的限重自動減量再發車,現在不再自動重試,得在出發前自己把上限填好。
官方原文
Removed 2.1.326's automatic retry at the limit named in a max_tokens error; behind a gateway whose model takes fewer output tokens, set CLAUDE_CODE_MAX_OUTPUT_TOKENS to that limit
VS Code 信任重審提示與登入、額度顯示
在 VS Code 拒絕信任資料夾、等登入回應或看額度橫幅,操作與顯示都更順手。
拒絕信任提示後,訊息框上方會多出一行提示與「Review trust」按鈕,不用重載整個視窗就能再把信任提示叫回來。
登入伺服器花了 10 到 30 秒才回應擴充功能的 token 更新時,不會再連累所有視窗和終端機裡的 Claude Code 一起被登出。
正在使用點數時,額度上限橫幅現在會如實標示,工作階段問卷也不會再擋住這條橫幅跟使用點數卡片。
跟逛網站先按了「暫不同意條款」一樣,現在輸入欄上方會留一條小按鈕讓你隨時補按,不用整頁重刷,問卷小卡也不再蓋住剩餘點數。
官方原文
[VSCode] Added a line above the message box after you decline the trust prompt, with Review trust to bring the prompt back without reloading the window
[VSCode] Fixed being signed out of Claude Code in every window and terminal when the sign-in server took 10 to 30 seconds to answer the extension's token refresh
[VSCode] Fixed the limit banner not saying when usage credits are in use, and the session survey covering that banner and the usage credits card
VS Code 權限提示原因與鍵盤焦點調整
在 VS Code 確認內建工具的權限時,現在看得到安全檢查為什麼要問;其他權限提示用鍵盤或螢幕報讀也更好操作。
遇到 Bash、Edit、Write 等內建工具要求確認時,畫面會直接寫明安全檢查詢問的原因,不用靠猜。
開著「Account & Usage」對話框期間若有新的權限請求進來,螢幕報讀器現在會立刻播報,不用等到你關掉對話框才聽到。
當權限視窗的按鈕亮起啟用時,鍵盤焦點不會再被搶走,你可以安心繼續往下捲動看細節。
在權限清單一路按方向鍵 Down 時,現在會停在最後一個選項,不會再循環跳回「Yes」。
官方原文
[VSCode] Fixed the permission prompt for Bash, Edit, Write and other built-in tools not showing why a safety check asks
[VSCode] Fixed screen readers not announcing a permission request that arrived while the Account & Usage dialog was open until that dialog was closed
[VSCode] Fixed a permission prompt moving keyboard focus away from the details you were scrolling as its buttons switched on
[VSCode] Changed Down to stop at the last item of a permission prompt instead of wrapping to Yes
VS Code 刪除線、聽寫與指令文字顯示調整
在 VS Code 查看對話文字或指令輸出,格式跟字元的呈現方式有些變動。
像 3~5 … 7~10 這類用單個波浪號寫出來的數值範圍,不會再被吃掉波浪號並把中間文字畫上刪除線,現在只有雙波浪號 ~~text~~ 會顯示刪除線。
語音聽寫的錯誤訊息不再擠成細長的一欄,提問卡等待回答時轉圈圖示也不會一直轉個不停,執行失敗的 UTF-16 指令輸出也不再每個字母後面都冒出 NUL 符號。
指令輸出現在會把純顏色以外的隱藏字元與控制序列顯示成可見符號。這也讓波斯語、高棉語、寮語、僧伽羅語和馬拉雅拉姆語的文字目前看起來可能破碎或順序錯亂。
如同校對文章時把原本該印出來的波浪符號還原,並把隱藏的排版控制碼改用顯眼記號標出,代價是少數特定語言的文字排版暫時會被拆開。
官方原文
[VSCode] Fixed ranges written with a single tilde (3~5 … 7~10) losing their tildes and showing struck-through text between them; only ~~text~~ is struck through now
[VSCode] Fixed dictation errors wrapping into a narrow column, the spinner turning while a question card waits, and a NUL symbol after each letter in the output of a failed UTF-16 command
[VSCode] Changed command output to show hidden characters and control sequences other than plain colors as symbols, so Persian, Khmer, Lao, Sinhala and Malayalam text can look broken or out of order
修正 24 項
/mcp 顯示連線拒絕訊息並修正 410 誤判
遠端 HTTP MCP 伺服器拒絕連線時,以前畫面常只給一個冷冰冰的失敗結果,搞不清對方擋在哪。現在打開 /mcp 裡該伺服器的頁面,會多出一行「Server message」,直接把遠端回傳的 JSON-RPC 錯誤訊息攤給你看。
用 claude mcp login 或 /mcp 登入時,若對方的用戶端註冊已經停用並回傳 HTTP 410 Gone,畫面也不會再誤判成該服務不接受從 Claude Code 登入。
好比打客服專線被掛斷時,電話不再只響忙音或誤報「門號禁止撥打」,而是直接播報對方總機寫好的故障原因,讓你立刻知道是哪一關擋下來。
官方原文
Added a "Server message" row to a server's page in /mcp that shows the JSON-RPC error message of a remote HTTP MCP server that refuses the connection
Fixed claude mcp login and /mcp saying a service doesn't accept sign-ins from Claude Code when the service's client registration had been retired (HTTP 410 Gone)
MCP 驗證、重連與工具載入的四項修復
連接外部工具最怕遇上斷線或驗證打架,這幾項異常狀態現在穩多了。
剛清除某台 MCP 伺服器的登入驗證,剛好撞上背景正在更新 token(授權令牌)時,伺服器不會再莫名其妙又自動登入回來。
背景的 MCP 任務在慢速重連後不再卡死。只要遠端 HTTP MCP 伺服器停留在較舊的協定版本,Claude Code 現在會自己幫大多數這類伺服器重新連線。
開啟工具搜尋的工作階段裡,已連上的 MCP 伺服器若工具載入失敗,Claude 現在會收到明確告知,不再誤以為它沒有任何工具。
同一網址的其他外掛或 MCP 伺服器連線失敗時,Claude Docs 連接器的工具不會跟著消失,錯誤提示也不會再亂叫你去執行 /login。
官方原文
Fixed an MCP server being signed in again after you cleared its authentication while a token refresh was running
Fixed background MCP tasks that stalled after a slow reconnect: Claude Code now reconnects most HTTP MCP servers by itself when one is left on an older protocol version
Fixed Claude not being told that a connected MCP server's tools could not be loaded, and taking it for a server with no tools, in sessions with tool search
Fixed the Claude Docs connector's tools going missing when a plugin or MCP server at the same address failed to connect, and its error wrongly suggesting /login
修正檔案收存變 .bin 與首次傳檔失敗
從 MCP 伺服器或網站傳來的 PDF、圖片,以及 .docx、.xlsx、.pptx 檔案,有時會以 application/octet-stream 格式送出。過去這類檔案會被存成 .bin,導致 Claude 讀不到 PDF 與圖片,現在已經修好。
使用 Opus 4.8 與 Opus 5 請 Claude 傳檔案給你時,第一次傳檔偶爾失敗的狀況也修好了,不用再請它重傳一次。
官方原文
Fixed PDFs, images and .docx, .xlsx or .pptx files that MCP servers or websites send as application/octet-stream being saved as .bin, which kept Claude from reading the PDFs and images
Fixed Claude sometimes failing to send you a file on its first try on Opus 4.8 and Opus 5
Code Mode 呼叫 MCP 工具的等待與結束修復
在 Code Mode 腳本裡呼叫 MCP 工具等回應,過去可能在等待期間被停止,或直接無視工具訊號。
腳本等待 MCP 表單、連結提示或每次必問的提示回答期間,不會再因十分鐘上限而被停止。
大多數超過 2 分鐘的 MCP 呼叫,不再把「移到背景執行」這句話當成資料塞回給腳本。腳本現在最多會等到 10 分鐘,超過才回報錯誤。
當 Claude 等待腳本執行期間,若裡面的 MCP 工具要求結束這一輪對話,Code Mode 現在會照辦,不再忽視這個訊號。
官方原文
Fixed Code Mode stopping a script at its ten-minute limit while an MCP form, an MCP link prompt or a prompt that always asks was waiting for an answer
Fixed Code Mode scripts receiving a "moved to the background" message as data from most MCP calls over two minutes: the script now waits up to ten minutes, then gets an error
Fixed Code Mode ignoring an MCP tool's request to end the turn when the tool was called from a script that Claude waits for
Code Mode 腳本變數、參數與中斷顯示修復
在 Code Mode 寫腳本並按 Esc 中斷,以前容易遇到幾個摸不著頭緒的毛病。
按 Esc 中斷後,腳本已經完成的編輯與被停下的指令不再躲起來,離開時也不會一併消失。
新腳本宣告 let x; 時,終於會是個乾淨的變數,不會偷留前一段腳本塞給 x 的舊值。
呼叫本來就不需要參數的工具時,不傳引數過去也不會再錯報「缺少參數」。
當工作階段裡掛了超過 4,096 個工具時,腳本透過 tools 依然找得到所有工具,不會半路失去存取權。
官方原文
Fixed Code Mode hiding a script's finished edits and the stopped command after Esc, and losing them on exit
Fixed a Code Mode script's let x; keeping the value that an earlier script gave x
Fixed a Code Mode script's call with no argument failing with a missing-parameter error on tools that need none
Fixed Code Mode scripts losing access to tools through tools in sessions with more than 4,096 tools
修正網路卡頓導致 ~/.claude.json 遭重置
以前萬一遇到網路卡頓或檔案被鎖住,讓 ~/.claude.json 一時讀不到,存檔時整個設定檔就可能被清空重設回預設值。這個問題已經修好,你的設定不會再無故被洗白。
官方原文
Fixed ~/.claude.json sometimes being reset to defaults when a network stall or file lock made it unreadable and cleared during a save
macOS 鑰匙圈無法寫入時的登入與診斷調整
在 Mac 上如果 Claude Code 讀得到鑰匙圈卻寫不進去,以前常會把你反覆登出。現在更新登入憑證時會改用名為 Claude Code-write-check 的項目測試寫入權限。真的寫不進去時,只會讓目前這個工作階段在憑證到期時停下並說明原因,其他工作階段會繼續保持登入。
在 macOS 沙盒環境裡執行 claude doctor 時,也不會再誤建議你解鎖鑰匙圈,因為在沙盒裡解鎖根本幫不上忙。
像員工打卡鐘一時只能讀紀錄卻寫不進新班別,其他樓層的門禁不受影響,只有剛好到期的那張證件會亮燈說明停卡原因,管理室也不再叫你重設鎖死的分機。
官方原文
Fixed repeated sign-outs on macOS when Claude Code could read the Keychain but not save to it. That session now stops at expiry and says why, and other sessions stay signed in
Changed macOS login renewal to test the Keychain with a Claude Code-write-check item
Fixed claude doctor advising a Keychain unlock inside a macOS sandbox, where unlocking can't help
/terminal-setup 與自訂快捷鍵修復
操作表單、查看按鍵提示,或請它設定終端機與編輯器,現在不會再出錯或失靈。
跑 /terminal-setup 改 VS Code 設定或 keybindings.json,不再破壞區塊註解附近內容,有未閉合字串也不會漏掉 Shift+Enter 綁定卻回報成功。
在 macOS 27 的 Terminal.app,不再開啟「Use Option as Meta key」,提示也不再把 Shift+Enter 寫成 Option+Enter。
權限確認、提問、/model 與 /rewind 提示,都改照 keybindings.json 顯示。
自訂取消鍵在 /add-dir、/tui 回饋與儲存工作流表單都有效;在該表單按方向鍵不再移動背後游標。
官方原文
Fixed /terminal-setup corrupting VS Code settings or keybindings files around block comments, and reporting success while losing the Shift+Enter binding where keybindings.json has an unclosed string
Fixed /terminal-setup turning on "Use Option as Meta key" in Terminal.app on macOS 27, and tips there suggesting Option+Enter instead of Shift+Enter
Fixed key hints in permission prompts, questions, /model and /rewind ignoring keybindings.json
Fixed a custom cancel key not working in /add-dir, /tui feedback and the save-workflow form
Fixed arrow keys in the save-workflow form moving the selection in the workflow view behind it
修正 IDE 差異存檔遺失換行與 BOM 標記
在 IDE 差異比對畫面點選接受修改,過去存檔後常少掉檔案最後一個換行符號。在 VS Code 直接儲存差異檔,甚至會弄丟開頭的位元組順序記號 BOM,這兩個問題都已修好。
官方原文
Fixed files accepted through the IDE diff being saved without their last newline, and losing their byte order mark (BOM) when an edit was accepted by saving the diff in VS Code
修正 /teleport 挑選雲端對話覆蓋目前紀錄
在 /teleport 挑選雲端工作階段時,以前會直接把你眼前正在聊的對話蓋掉。這個問題已經修好,現在選取後會像輸入 /clear 一樣開出一個新工作階段,想找回原本的對話只要打 /resume 就回得來。
官方原文
Fixed picking a cloud session in /teleport replacing your open conversation: the pick now starts a new session, as /clear does, and /resume brings the old one back
額度點數、消費上限與 /passes 顯示修復
查看額度或調整消費上限,以前可能遇到重複登入或提示與實際狀態不符。
Pro 與 Max 用戶開 /usage-credits 打開瀏覽器後,不再被要求重新登入。若瀏覽器沒開起來且任務因點數暫停,連結也不會在 8 秒後就消失。
使用點數用完或達到每月上限時,/usage 不再誤報點數功能已關閉。每月上限擋住使用點數運作的模型時,/model 會提醒 Pro 與 Max 用戶。
消費上限選單不再把目前花費錯印成每月上限,視窗較窄時選項也不會折行壓到滑鼠游標底下。
/passes 在伺服器出錯後不再顯示錯誤的訪客券數量,沒剩訪客券時也不再提示分享可得使用點數。
官方原文
Fixed /usage-credits asking Pro and Max users to log in again after opening the browser, and the link disappearing after 8 seconds if the browser doesn't open and a task stops for usage credits
Fixed /usage saying usage credits are off when they had run out or reached the monthly limit, and /model not telling Pro and Max users when that limit blocks a model that runs on usage credits
Fixed the spend limit menu showing your spend as your monthly limit and wrapping its rows under the pointer in narrow windows
Fixed /passes showing the wrong number of passes after a server error, and offering usage credits for sharing when no guest passes are left
修正 /config 開關連動與狀態列卡死
在設定畫面切開關或自訂終端機底部工具,介面反應與回饋都修正了。
若你自己寫的 status line(顯示在終端機最底下的狀態列)腳本停不下來一直印出內容,現在不會再把輸入列卡死並吃掉好幾 GB 記憶體。
在正在跑的工作階段裡改 /config 開關時,自動捲動、PR 狀態徽章、自動壓縮警告與 ultracode 標籤現在都會跟著即時切換。
在 /config 一次改了好幾個設定後,畫面也不再安靜沒反應或只冷冷回一句「dismissed」。
官方原文
Fixed a status line script that prints without end freezing the prompt and using gigabytes of memory
Fixed auto-scroll, the PR status badge, the auto-compact warning and the ultracode tag not following the /config switches that control them in a running session
Fixed /config saying nothing, or "dismissed", after changing many settings
/code-review 比對與結果顯示修正
請 Claude 用 /code-review 幫忙檢查程式碼,過去常審錯分支,或莫名卡在不存在的檔案權限。
不帶目標時,多數模型改把整條分支跟預設分支比對,並修好跨多筆提交漏掉差異。
指定 /code-review <pr number> 會改用 gh pr diff 讀該 PR,不再默默審本地分支。讀不到會說明。
帶 --fix 的 PR 編號形式,或提供 PR 網址時,若 gh pr diff 失敗或被拒,會直接停止審查。
多數模型不再為不存在的 ~/.claude/CLAUDE.md 跳權限確認,結果卡片也不再把中等審查標成「high」。
官方原文
Fixed /code-review <pr number> sometimes reviewing the checked-out branch instead of the pull request without saying so: it now reads the pull request with gh pr diff, or says when it can't
Fixed /code-review stopping at a permission prompt, on most models, to look for a ~/.claude/CLAUDE.md that doesn't exist
Fixed the /code-review findings card often showing "high" for a review that ran at medium, on most models
Changed /code-review with no target on most models to review the whole branch against the default branch, and fixed it losing the diff on multi-commit branches
Changed /code-review <pr number> --fix, and /code-review given a pull request URL, to stop without reviewing when gh pr diff is refused or fails
自架執行器修正 Git LFS、SSH 與啟動誤判
在 Self-hosted runner(自架執行器)環境跑工作階段,Git 倉庫設定與連線問題少了很多。
加上 --push-outcome-on-release 時,不再偶爾誤刪遠端 Git 主機上該工作階段的分支。
透過 Anthropic 託管 Git 複製 Git LFS 倉庫時,工作階段準備失敗的問題已修好。工作階段會先從指標檔啟動,需要實際內容時再執行 git lfs pull 抓下來。
遠端網址若使用 SSH 主機別名、GitHub SSH 憑證或 GHE.com SSH 使用者,現在都能順利啟動。遇到無法解析的別名時,錯誤訊息還會直接附上兩個 git 指令。
遇上逾時或網路錯誤後,遠端 MCP 伺服器不再停在無工具或 HTTPS 斷線狀態;Claude Code 還在啟動期間,也不再被誤顯示成沒有回應。
官方原文
Self-hosted runner: Fixed --push-outcome-on-release sometimes deleting a session's branch on the git host
Self-hosted runner: Fixed setup failing on Git LFS repositories cloned through Anthropic-managed git; sessions now start on pointer files, and git lfs pull fetches the content
Fixed sessions on self-hosted environments not starting from a git remote with an SSH host alias, GitHub SSH certificates or a GHE.com SSH user; an unresolved alias's error gives two git commands
Fixed remote MCP servers in self-hosted runner sessions staying without tools, or (over https) disconnected, after a timeout or network error
Fixed self-hosted runner sessions being shown as having stopped responding while Claude Code was still starting
代理團隊與背景任務的中斷、執行調整
同時指揮多個代理或跑背景任務,控制與中斷反應終於對得上指令了。
在代理團隊裡替具名隊友設定 Agent 工具的 effort 參數時,現在會真正生效,不再被忽略。
部分隊友窗格現在改透過 /bin/sh 啟動,因此可能不會讀取你原本設定的 shell 啟動檔。
背景代理正在恢復時被喊停,不會再繼續往下跑;雲端工作階段重啟期間若背景任務被停掉,Claude 現在也會收到通知。
在 Bedrock 上用 Claude Desktop 工作階段時,若卡在沒回應的 AWS credential_process 或登入呼叫,按下 Stop 現在能真正結束這次請求。
官方原文
Fixed a background agent running on when it was stopped while it was being resumed
Fixed Stop not ending a request in Claude Desktop sessions on Bedrock while it waits on a hung AWS credential_process or sign-in call
Fixed the Agent tool's effort parameter being ignored for named teammates in agent teams
Fixed Claude not being told when a background task was stopped while a cloud session was restarting
Changed some teammate panes to start through /bin/sh, so they may not read shell start-up files
外掛同步、無頭斷線與雲端重試修復
外掛同步到各裝置使用時,外掛跟底下工具的開關總算對得上。
又修好一種在 macOS 工作階段執行期間,claude.ai 同步外掛的 hook 出現『Plugin directory does not exist』錯誤的情況。
在 headless(無頭模式,沒有終端機視窗的執行模式)工作階段裡,執行 reload_plugins 後,或帳號清單移除外掛後,已移除外掛連著的 MCP 伺服器會跟著斷開。
雲端工作階段啟動時,下載失敗的外掛現在會重試。
官方原文
Fixed another case of claude.ai-synced plugin hooks failing with "Plugin directory does not exist" while a session was still running on macOS
Fixed a removed plugin's MCP server staying connected in headless sessions after reload_plugins or when the account's plugin list drops it
Improved cloud sessions to retry plugins that failed to download at startup
修正 Linux /sandbox 通訊插槽誤標
過去看到清單把 allowUnixSockets 列為已允許,會以為這項設定有生效。其實在 Linux 下執行 /sandbox 並不會真的開放這些通訊插槽,現在 /sandbox 已改為如實標明不開放。
官方原文
Fixed /sandbox on Linux listing allowUnixSockets entries as allowed: they don't open those sockets there, and /sandbox now says so
修正 /install-github-app 與分享狀態誤報
用 /install-github-app 裝 GitHub 應用打錯驗證碼,連按兩下 Esc 想清掉重打卻直接中止登入,現在可以安心清空重輸。
在 Team 與 Enterprise 方案執行 /team-onboarding 時,若伺服器其實拒絕了上傳,畫面不再誤報成指南已經分享成功。
官方原文
Fixed pressing Esc twice to clear a mistyped code ending the sign-in in /install-github-app
Fixed /team-onboarding reporting a guide as shared on Team and Enterprise plans when the server refused the upload
修正外加目錄漏掃與無頭模式搶先分岔
用 --add-dir 指定目前的工作目錄,或從家目錄啟動 Claude Code,過去可能會漏讀新建的 skills、commands 或 agents 資料夾,現在都能掃到。
在 headless 無頭模式下,如果切換模型後馬上送出的訊息還在等模型切換完成,倒轉與分岔不會再搶先往下執行。
官方原文
Fixed a new skills, commands or agents folder being missed when --add-dir names the working directory or Claude Code starts in the home folder
Fixed headless rewind and fork going ahead while a message sent right after a model change still waited on it
專案設定套用與權限儲存警告修復
改完專案設定卻覺得沒生效,或存權限時莫名跳警告,這些狀況都修好了。
從預熱程序啟動的工作階段,現在會讀取專案 .claude/settings.json 裡的 autoCompactWindow 設定,不再略過。
從 settings.json 拿掉 CLAUDE_AUTOCOMPACT_PCT_OVERRIDE 後,正在跑的工作階段也會立刻解除它的效果,不再殘留。
在子資料夾或 worktree(工作樹,Git 讓同一專案平行開多份副本的功能)裡,有時自己的 .claude/settings.local.json 無法讀取或格式有誤。在此新增權限規則或資料夾時,現在不會再誤跳「Couldn't save this change」警告。
官方原文
Fixed sessions started from a pre-warmed process ignoring the autoCompactWindow setting in the project's .claude/settings.json
Fixed CLAUDE_AUTOCOMPACT_PCT_OVERRIDE staying in effect in a running session after it is removed from settings.json
Fixed a false "Couldn't save this change" warning after adding a permission rule or directory in a subfolder or worktree whose own .claude/settings.local.json is unreadable or malformed
終端機畫面捲動、提示列與視窗裁切修復
在終端機翻看歷史紀錄、開全螢幕或縮小視窗,畫面不再動不動缺字斷行。
全螢幕下的面板與提問不再在輸入列被截斷。視窗較矮時,/help、歷史搜尋與背景任務清單不會再漏列或遺失標題,對話框裡的表格也不會亂折行。
複製文字後往上捲,「Jump to bottom」按鈕不再繼續躲起來,標籤換字時底下那行也不會變空白。全螢幕下連按 PageUp 也不會捲過頭。
記憶體吃緊時畫面不再偶爾漏掉更新,長程式碼區塊在捲動紀錄裡也不會少一行空白卻重複另一行。
輸入列文字若帶著同時設定多種樣式的色碼,又有關鍵字或指令被突顯,字元不再無故消失。
官方原文
Fixed panels and questions being cut off at the prompt in fullscreen, /help, history search and the background tasks list losing rows or titles in short windows, and tables wrapping in dialogs
Fixed the "Jump to bottom" pill staying hidden after copying text and scrolling away, the row under it going blank when its label changed, and quick PageUp presses scrolling too far in fullscreen
Fixed a screen update sometimes being skipped when memory is low
Fixed long code blocks losing a blank line and repeating another in scrollback
Fixed characters disappearing from the prompt when its text held a color code that sets several styles and a keyword or command was highlighted
對話接續標記、讀檔行數與說明輸出修復
接續舊對話或查看檔案與指令說明,畫面上幾處誤導人的文字都拿掉了。
接回上次工作階段時,原本因對話結束而被中斷的編輯、提問與計畫,不會再被誤標為「Rejected」或「Declined」。接續時提及早期訊息的那行提示,也不再冤枉完好無缺的檔案已損毀。
讀取工具與 @ 提及功能在遇到結尾有換行符的檔案時,不再多顯示一行。
輸入框的下一句建議不再偶爾冒出 _(no suggestion)_ 這類佔位文字。
將 claude --help 的說明文字透過管線傳給其他程式時,輸出內容不會再半路被截斷。
官方原文
Fixed resumed sessions showing "Rejected" or "Declined" for edits, questions and plans that were cut off when the session ended
Fixed claude --help output being cut short when piped to another program
Fixed Read and @-mentions showing one line too many for files that end in a newline
Fixed prompt suggestions sometimes showing placeholder text such as _(no suggestion)_
Fixed the line about earlier messages on resume blaming a damaged file when the file was intact
VS Code 中文輸入法組字防誤觸修復
用中文輸入法選字卻不小心按到 Enter 送出,是不是很崩潰?在 VS Code 用中文或日文等輸入法打字時,現在不會再因為一個按鍵就誤觸選單或蓋掉輸入內容。
輸入法正在組字期間按下按鍵,不會再誤移權限提示的焦點、直接拒絕確認、觸發選單列項目或把對話框關掉。
寫到一半的計畫評論不會再無故遺失或跑去別段文字。組字選字時按 Enter,也不再誤把評論送出、提早結束工作階段改名,或是錯選 @ 提及的檔案。
在訊息框組字時按方向鍵 Up,也不再直接叫出上一則歷史訊息把剛打好的組字蓋掉。
官方原文
[VSCode] Fixed keys pressed while an input method (IME) is composing moving focus on or declining a permission prompt, running menu rows and closing dialogs (anthropics/claude-code#106358)
[VSCode] Fixed a half-written plan comment being lost or moved to another passage, and an input method's Enter sending the comment, ending a session rename or picking an @-mentioned file
[VSCode] Fixed the Up key putting an earlier message over text that an input method (IME) is composing in the message box (anthropics/claude-code#101294)
VS Code 分頁開啟、差異頁與拖曳修復
在 VS Code 拖放資料夾、點連結開檔或看工具輸出,分頁跟按鈕不再跟你作對。
當終端機的 Claude Code 工作階段斷線後,原本的建議修改差異分頁不再繼續留著,裡面那個按了沒反應的 Accept 按鈕也會一起收掉。
工具的簡短輸入與輸出被面板邊緣裁切時,現在可以點開到編輯器分頁看完整內容。單純拖曳反白選取文字時,也不會再誤開新分頁。
在 VS Code 1.103 到 1.139 版或浮動聊天視窗裡,從檔案總管把資料夾拖進對話框不再毫無反應,拖曳亮框也不會消失並錯跳「Hold Shift」提示。
關閉 claudeCode.lockEditorGroups 設定時,在 Claude 分頁點檔案連結也不再跑去別的編輯器群組打開。
官方原文
[VSCode] Fixed a proposed-edit diff tab staying open, with an Accept button that did nothing, after its terminal Claude Code session disconnected
[VSCode] Fixed short tool inputs and outputs cut off at the panel's edge with no way to read the rest (they now open in an editor tab), and dragging to select text also opening one
[VSCode] Fixed dropping an Explorer folder onto the chat inserting nothing on VS Code 1.103 to 1.139 or in a floating chat window, and the drop highlight vanishing with a false "Hold Shift" hint
[VSCode] Fixed file links in a Claude tab opening in another editor group when claudeCode.lockEditorGroups is off (anthropics/claude-code#108884)