usage

Claude Code 2.1.265

工具與目錄
在這頁

新功能 6 項

01

外掛目錄支援整批載入,執行中增刪子資料夾動態生效

如果你平常習慣自行開發多套擴充功能,過去每次啟動命令列時都得逐一指定外掛路徑。⟦這好比在展示架上加裝多格活動收納匣,只要把裝有說明清單的小抽屜放進去就會自動啟用,中途抽換或添補也不必拆開展示架。⟧現在 --plugin-dir 參數直接支援指向包含多個外掛的父資料夾。只要其下的每個子資料夾具備清單檔案(記錄外掛名稱與規格的說明文件),系統啟動時就會自動識別並載入全部擴充套件。更方便的是,在程式執行運作途中,若你在該目錄下新增或移除子資料夾,變更都會被即時動態偵測並直接生效,省下反覆重開對話的麻煩。

官方原文

Added support for pointing --plugin-dir at a folder of plugins: each child folder with a manifest loads, and children added or removed while running are picked up

02

工作流面板支援展開呼叫細節,分支技能串流與容器復原更明確

執行多步驟的工作流與分支技能時,進度追蹤與異常診斷變得清楚直接。在 /workflows 代理人詳細資訊面板中,各項工具呼叫現在會清晰標記為執行中、失敗或已完成,若子代理人附帶工作清單也會同步呈現,按下 Enter 鍵還能直接展開查看呼叫參數與執行結果。當使用分支技能(以 context: fork 在獨立背景分支執行的技能)時,其起始提示詞,以及搭配 --forward-subagent-text 產生的對話回合,現在都會以進度事件正確串流至 stream-json 輸出。如果工作流容器重啟且執行日誌遺失,系統會直接回報明確錯誤訊息,不再盲目重跑每一個代理人。⟦整個過程宛如在現代化工廠中控室加裝多色燈號顯示器,各工作站進度一目了然,遇到履歷遺失也會直接報警停機,避免重覆生產。⟧

官方原文

Fixed forked skills (context: fork) not streaming their kickoff prompt and, with --forward-subagent-text, their text turns as progress events in stream-json

Fixed resuming a workflow run after its container restarted; a resume whose run journal is missing now fails with a clear error instead of rerunning every agent

Improved /workflows agent detail: tool calls are marked running, failed or done, the subagent's task list is shown when it has one, and Enter unfolds the listed calls with their inputs and results

03

企業閘道遙測直連收集器,補齊身分欄位且轉發不再暫停

企業管理者透過閘道收集稽核資訊時,傳輸穩定度與身分欄位獲得顯著增強。Claude Desktop 與 Cowork 透過應用程式閘道傳送遙測資料時,現在補上了 user.email 與 user.groups 兩項欄位,與終端機工作階段的記錄規格保持一致。當閘道的受管設定中透過 OTEL_EXPORTER_OTLP_ENDPOINT 指定了收集器位址,閘道工作階段會直接將 OpenTelemetry 遙測數據匯出至該收集器,不再繞經閘道轉發;未指定收集器的工作階段則繼續走轉發路線。此外,過去轉發器在拒絕少數格式錯誤或過大的封包後,會將所有後續轉發暫停 30 秒,這項停頓問題如今已被修復。⟦這有如企業郵務室為各部門包裹貼上完整的員工名條,在設有直達專車時直接發車,不再因單件包裹超重而把整條輸送帶扣留半分鐘。⟧

官方原文

Added user.email and user.groups to the telemetry Claude Desktop and Cowork send through a Claude apps gateway, matching terminal sessions

Fixed the Claude apps gateway's OTLP telemetry relay pausing all forwarding to a collector for 30 seconds after it rejected a few payloads as malformed or too large

Changed Claude apps gateway sessions to export OpenTelemetry directly to a collector the gateway's managed settings name in OTEL_EXPORTER_OTLP_ENDPOINT, instead of through the gateway's relay; sessions without a named collector still use the relay

04

工具輸出寫入增設 1 GB 上限,嚴格驗證工件發布並防禦惡意指令

工具輸出存檔防護與工件安全性,在這一版築起了更嚴謹的防線。當外部工具執行的輸出結果過於龐大時,寫入磁碟的暫存檔案現在新增了 1 GB 上限;若檔案內容遭到截斷,對話視窗內的預覽區塊會主動標註已截斷警示,避免硬碟空間被無止境耗盡。在工件(由 AI 生成並可獨立展示或發布的程式與文件)管理方面,發布時若指定了連接器根本沒有提供的工具名稱,若宣稱的工具完全不存在會直接拒絕發布,部分不存在時則會跳出警告。此外,當讀取他人撰寫的工件時,摘要流程現在會將頁面內容視為未受信任的資料,主動標記其中暗藏的指令,而不是把那些指令原樣轉述出去,有效防範提示詞注入攻擊。⟦整個防護機制就像快遞驗收處為超大貨物設置重裝上限,核驗發行手續上的印章授權,並對外來信件裡的夾帶便條嚴加把關。⟧

官方原文

Added a 1 GB cap on tool results saved to disk; the in-conversation preview says when a saved file was truncated

Fixed artifact publish accepting connector tool names the connector doesn't expose; the publish is now refused when none of the declared tools exist, and warned when only some don't

Improved the Artifact tool's read of an artifact someone else wrote: the summary now treats the page as untrusted content and flags embedded instructions rather than relaying them

05

圖片處理改用內建引擎,超限錯誤清楚標註成因與解法

在終端機中處理圖片時,底層架構變得更加輕量俐落。⟦這好比隨身相機改用機身自帶的解碼晶片直接讀圖,不再把精密模組拆到暫存托盤上拼裝,遇到超大相片時也能具體指出尺寸過大並建議縮圖。⟧命令列介面現在全面改用執行階段的內建圖片功能,不再於每次啟動時將原生二進位模組解壓縮至暫存目錄,有效精簡了磁碟寫入負擔與檔案殘留。同時,當載入的圖片超出限制而無法解碼時,過去錯誤提示往往只單純引述上限規範;現在訊息會明確指出失敗的根本原因,並提供相應的修改排查建議,方便你快速調整圖片規格並繼續對話。

官方原文

Improved the error shown when an image over the size limits cannot be decoded: it now names the cause and how to fix it instead of only citing the limit

Changed image processing to use the runtime's built-in image support; the CLI no longer extracts a native image module to the temp directory

06

斜線指令支援完整搜尋清單,雙鍵快捷鍵寬限延長且排版穩定

終端機的日常互動與指令清單體驗,在此版迎來細緻的排版與手感調校。在文字輸入中途鍵入斜線指令時,現在會以完整清單展開所有符合項目(在全螢幕以外模式可按 Tab 鍵展開),且外掛技能直接打簡短名稱就能找到。在 tmux 等多工環境下,兩鍵組合快捷鍵若第二個按鍵相隔超過 1 秒,過去會靜默取消,現在改為等待 3 秒並於逾時時跳出提示。全螢幕對話紀錄不再因為選單開合而上下晃動一行。切換 /config 分頁時對話框高度保持固定。授權確認訊息不再吃掉特有語法符號後的字元。恢復工作階段時未完成的背景工作也改以簡短狀態列顯示,不再被落落長的內部指示洗版。⟦這宛若演奏家踩踏快速曲目踏板,容許節奏微調且跳出警示,樂譜面板也穩固如初不再隨意跳行。⟧

官方原文

Fixed syntax-highlighted code in permission prompts and messages sometimes omitting a character after a Ruby ?, Erlang $, or Perl $ sigil

Fixed the fullscreen transcript jumping by one row whenever the slash-command or @-file suggestion list opened or closed

Fixed two-key keyboard shortcuts cancelling silently when the second key arrived more than a second later, as happens inside tmux; they now wait 3 seconds and show a notice when they time out

Fixed the /config dialog changing height when switching between its tabs

Fixed resumed sessions showing long model-facing recovery instructions in "background task didn't finish" notices instead of a short status line

Improved slash commands typed mid-prompt: matches now show in a list (Tab opens it outside fullscreen) instead of a single suggestion, and a plugin skill is now found by its bare name

修正 8 項

07

外掛路徑檢查防護補強,市集資訊與安裝清單更完整

管理外掛時的安全驗證與市集清單呈現,在這版獲得全面修正。在 macOS 與 Linux 上,路徑含有反斜線的外掛不再繞過符號連結(指向目標路徑的捷徑檔案)安全檢查。名稱開頭為雙點號的資料夾,也不會再被誤判為超出外掛根目錄。若遇到作業系統無法檢查的元件目錄(例如符號連結無限循環),過去會被默默略過,現在會於 /plugin 明確回報錯誤碼。在資訊顯示方面,若外掛中繼資料只寫在 plugin.json,市集探索清單與 claude plugin list --json --available 會完整顯示描述與名稱;已安裝分頁和 claude plugin details 則優先採用市集登記資訊,並以檔案補齊缺漏欄位。⟦整體審查好比商業大樓嚴格查驗各進駐商家的登記捷徑與門牌,並將專櫃招牌統整更新,缺漏資訊也能自動對照底冊補齊。⟧

官方原文

Fixed a plugin path containing a backslash bypassing the symlink containment check on macOS and Linux

Fixed plugin directories whose names begin with two dots being wrongly refused as outside the plugin root

Fixed a plugin's default component folder that the OS cannot check, such as a symlink loop, being silently skipped; it is now reported in /plugin with the error code

Fixed /plugin Discover/Browse and claude plugin list --json --available showing no description or display name for marketplace plugins whose metadata lives only in their plugin.json

Changed plugin display metadata to prefer the marketplace entry over plugin.json on the Installed tab and claude plugin details, filling gaps from plugin.json

08

子代理提示前綴維持固定,快取命中率提升且工具中斷不重寫

多代理人協作與接續執行工作時,提示詞的快取機制現在更加可靠。⟦這如同研究員交接時維持相同開場索引,前言與工具清單固定不動便能重複查閱現有筆記,遇到意外停電也會在未完成的紀錄旁夾上中斷書籤。⟧先前恢復前景生成的子代理人時,工具清單與系統提示詞前綴常會變動,導致快取(把算過的資料暫存起來供後續直接取用)無法重用。隊友代理人與恢復後的子代理人,也會在後續回合將 SubagentStart 掛鉤(特定事件觸發時執行的自動程式)與預載技能移出前綴,同樣破壞快取效益。現在這些前綴結構已全數鎖定固定位置。此外,若前次行程在工具執行途中無預警終止,恢復時不再重寫最後一道提示詞,而是完整保留該次工具呼叫並標記為中斷。

官方原文

Fixed resuming a foreground-spawned subagent changing its tool list and system prompt prefix, which broke prompt-cache reuse for that agent

Fixed agent teammates and resumed subagents moving SubagentStart hook context and preloaded skills out of the prompt prefix on later turns, which broke prompt-cache reuse

Fixed resume after the previous process died while a tool was running: the last prompt is no longer rewritten, and the interrupted tool call is kept and marked interrupted

09

受管設定強制啟動閘道登入,精準辨識子目錄代理人權限

在由企業受管設定規範的環境中,登入流程與權限界定變得更加嚴格一致。⟦這就像在企業大樓門禁加裝專用管制閘門,訪客從踏入大廳起就必須以公司證件感應通行,隨身舊訪客貼紙一律失效,樓層借調時也不會查錯權限名冊。⟧凡是在受管設定中配置了 forceLoginGatewayUrl 的電腦,啟動時便會直接建立應用程式閘道工作階段,行為等同於 forceLoginMethod: "gateway";殘留的 claude.ai 登入狀態或 API 金鑰一概不予採用。在此類由受管設定導向閘道的工作階段中,重新執行 /login 不再誤報未設定閘道網址。此外,使用 /add-dir <subdirectory> 載入子目錄時,若受管設定僅將技能鎖定在外掛,系統不再拒絕載入該目錄的代理人,反之在僅鎖定代理人時也不會錯誤承諾提供代理人。

官方原文

Fixed /add-dir <subdirectory> refusing to load a subdirectory's agents when managed settings lock only skills to plugins, and promising agents when only agents are locked

Fixed /login showing "no gateway URL is configured" when re-run in a session that signed in to a Claude apps gateway set by managed settings

Changed machines with forceLoginGatewayUrl in managed settings to be Claude apps gateway sessions from startup, like forceLoginMethod: "gateway"; a leftover claude.ai login or API key is not used

10

遠端操控與背景工作階段穩定性升級,工作目錄切換跨回合保留

遠端操控與背景工作階段的操作連貫性,在此版大幅改善。非互動式工作階段(如 -p 搭配 stream-json、Agent SDK 與雲端環境)不再於每則訊息重設工作目錄,cd 指令現在跨回合持續保留。遠端控制工作階段不再於最後訊息送達前搶先發出結束信號,避免應用程式提早顯示已完成。透過遠端控制執行 /clear 時,不再苦等 SessionStart 掛鉤(啟動時觸發的腳本)與終端機對話框。背景工作階段(--bg)不再因訊息剛好在閒置逾時前抵達而於回合中途被關閉。遠端沙箱在等待連接器核准或登入連結時不再持續保持活躍。在更新權杖(身分驗證令牌)時關閉 VS Code 或 SDK 工作階段,後續也不再要求重新登入。⟦這猶如遠距遙控探勘車作業,發話通道不提早切斷,更換坐標後也不會每回合被硬拉回原點。⟧

官方原文

Fixed VS Code and SDK sessions occasionally requiring re-login when a session was closed while refreshing its token

Fixed Remote Control sessions sending the end-of-turn signal before the reply's last message, which could show a reply as finished in the Claude app before its last part arrived

Fixed background (--bg) sessions occasionally being retired mid-turn when a message arrived just before the idle timeout

Fixed /clear from Remote Control waiting on SessionStart hooks and on open terminal dialogs before completing

Fixed non-interactive sessions (-p with stream-json input, Agent SDK, cloud sessions) resetting the shell working directory at each new user message; a cd now persists across turns

Fixed remote sessions keeping their sandbox container alive while a connector approval or sign-in link waits for you

11

MCP 支援傳統傳輸協議備援,延遲授權註冊且修正連線狀態

外部工具的連線交握與身分驗證機制,在本次更新中變得更具彈性。對於配置為 http 協定、卻只支援傳統 HTTP+SSE 傳輸架構的 MCP(讓 AI 連接外部工具的通訊協定)伺服器,過去往往永遠無法連線,現在會依照規格自動切換至 SSE 作為連線備援。在安全註冊方面,連線至需要登入的遠端伺服器時,系統不再預先註冊 OAuth 用戶端,而是等到你實際點選驗證時才發起註冊。此外,在雲端工作階段中,部分外部連接器伺服器若對不支援的請求回應 HTTP 401,先前會讓介面誤顯示為尚未登入,即便你在網頁版早已完成綁定;這項錯誤標示也已修正。⟦這宛如前往跨國商務櫃台辦理業務,雙方通訊埠能自動切換傳統備援線路,專屬通行證也只在確認臨櫃辦理時才現場印製。⟧

官方原文

Fixed MCP servers configured as http that only speak the legacy HTTP+SSE transport never connecting; Claude Code now falls back to SSE as the MCP spec describes

Fixed some claude.ai connectors in cloud sessions showing as needing authentication even though they are connected in claude.ai (servers that answer an unsupported request with HTTP 401)

Improved remote MCP servers that need sign-in: Claude Code no longer registers an OAuth client with them until you actually authenticate

12

Git 工作樹支援平行檢出,沙箱檔案讀寫與權限說明修復

本版針對檔案讀寫、版本控管與權限設定進行了多項底層改善。在大型專案中執行 --worktree 建立工作樹(Git 平行建立的多份專案副本)時,Git 2.32 以上版本支援平行檢出,大幅縮短啟動耗時。重啟曾讀取大量檔案的歷史工作階段,讀取速度也顯著提升。在 Windows 環境下,修正了於 AppContainer 或受限令牌沙箱中,檔案讀寫與編輯遭全面拒絕的錯誤。此外,內部檢查 Git 狀態與差異時,不再受到工作樹內巢狀專案配置的過濾規則干擾。授權選單中針對 .claude 目錄的權限說明文字也重新修訂,清楚標明其效果為允許在該工作階段內編輯專案 .claude 或使用者主目錄 ~/.claude 下的檔案。⟦整套流程好似大型圖書館同步調閱多套館藏副本,清理不同樓層的檢查規則,並把調閱清單的通行權限說明得一清二楚。⟧

官方原文

Fixed Claude Code's own git status and diff probes running clean filters configured by a nested repository inside the working tree

Windows: Fixed Read, Write and Edit refusing every file ("symlink resolution changed after permission was checked") when running inside an AppContainer or restricted-token sandbox

Improved --worktree startup on large repositories: the new worktree is now checked out in parallel (git 2.32+)

Improved the time to resume long sessions that read many files

Updated the .claude folder permission option to say what it actually allows: editing files in the project's .claude folder (or ~/.claude) for the session

13

模型切換支援特定代號,顧問工具決策固定且精準回報錯誤

切換模型規格與顧問機制時的判定邏輯,現在運作得更加穩定明確。⟦這如同委任專業顧問公司,合約窗口一旦確認就不會在每次發案時反覆改派,更換名單時也會主動寄發通知信。⟧過去顧問工具及其指示內容常因不同請求的模型而逐次重做決定;如今系統只會做一次判定,並在規則變動時於對話中主動公告。指令支援方面,輸入 /model opusplan[1m] 不再被誤判為模型不存在。若因設定檔無法寫入而導致預設模型儲存失敗,/model 不會再假裝已儲存成功,而是會如實告知儲存失敗及其原因。此外,內建的 claude-api 技能同步更正了錯誤代碼文件,清楚指明模型存取失敗會回傳 404,不支援的測試版標頭則回傳 400,而非先表記錄的 403。

官方原文

Fixed /model opusplan[1m] being rejected with "Model not found"

Fixed the advisor tool and its instructions being re-decided per request from the request's model; the decision is now made once and announced in the conversation when it changes

Fixed /model claiming a model was "saved as your default" when the settings file couldn't be written; it now says the save failed and why

Fixed the claude-api skill's error-code reference: model access failures return 404 and unavailable beta headers return 400, not 403

14

[VSCode] 閒置工作階段自動封存,重啟視窗不空白且版面修正

在 VS Code 擴充套件中,側邊欄的工作階段管理與視覺細節得到了貼心修正。為避免對話清單長期累積變得雜亂,新增了「封存閒置工作階段」(Archive inactive sessions)設定,預設會在閒置滿 14 天後自動將其移入封存區。先前若一個對話視窗開啟超過 10 分鐘,在執行視窗重新載入或重啟編輯器後,側邊欄對話往往會變成一片空白,這項顯示異常現已完全修復。同時,在顯示遠端控制已啟用的提示訊息中,時間軸圓點沉在文字下方的排版走位問題也已校正歸位。⟦這就像辦公室定期整理個人公文櫃,超過兩週沒動的歷史案件會自動移至封存資料夾,拉開抽屜時內容不再莫名消失,外側標籤也貼得平整端正。⟧

官方原文

[VSCode] Added automatic archiving of sessions inactive for a set period (new "Archive inactive sessions" setting, default 14 days)

[VSCode] Fixed the sidebar chat coming back blank after Reload Window or a restart when the conversation had been open for more than 10 minutes

[VSCode] Fixed the timeline dot sitting below the text on the "Remote Control is active" message