Claude Code 2.1.260
新功能 10 項
全螢幕比對面板上線,終端機畫面清爽不殘留
⟦就像在工作桌旁加裝一面可隨時收折的雙面鏡,一邊對話一邊就能看到最新改動的模樣。⟧在全螢幕模式下寫程式,現在可以輸入 /diff 開啟或關閉側邊的比對面板,即時查看 Claude 編輯時尚未提交的變更。當終端機畫面太滿時,按下 ctrl+l 或 cmd+k 就能清空畫面,想查閱歷史訊息只要往上捲動即可。此外,在全螢幕下按 Ctrl+Z 暫停不會再把外層 shell 畫面錯位畫在暫停介面上,國旗圖示、組合表情符號與重音字母在換行或行末最後兩格時也不會再破版或留下殘影。
官方原文
Added a diff panel that opens beside the conversation in fullscreen mode and shows your uncommitted changes as Claude edits; toggle it with /diff
Changed ctrl+l / cmd+k in fullscreen mode to clear the transcript view like a terminal clear; scroll up to see earlier messages
Fixed Ctrl+Z in fullscreen leaving the shell on the alternate screen, drawn over the paused interface
Fixed flags, joined emoji and accented letters splitting across wrapped lines, and stale text staying on screen when a flag or joined emoji falls in the terminal's last two columns (now shown as …)
無頭模式支援顧問指令,遙控操作更省資源
透過桌面端 App、Remote Control 或以 -p 參數執行的無頭模式(headless,沒有終端機視窗/視覺介面的執行模式)工作階段,現在能直接使用純文字形式的顧問指令。你可以輸入 /advisor、/advisor <model>、/advisor off 三種文字形式。同時,無頭環境也新增了 /reload-plugins 來重新載入外掛,因此會出現在 Claude Code Desktop 與 SDK 指令清單。如果遠端輸入了不存在的模型名稱,系統會在當下直接報錯拒絕,避免等到下一則訊息才崩潰。非互動模式(-p / SDK)工作階段的閒置時處理器用量改善。⟦這有如幫遠端遙控器補齊實體按鍵與省電待機功能,指令輸入錯誤時也會立刻亮燈示警。⟧
官方原文
Added /reload-plugins to headless sessions, so it appears in the Claude Code Desktop and SDK command lists
Added a text form of /advisor (/advisor, /advisor <model>, /advisor off) for the desktop app, Remote Control, and other headless (-p/Agent SDK) sessions
Fixed Remote Control accepting a model pick that is not a valid model name; it is now refused with an error instead of failing on the next message
Improved idle CPU usage of non-interactive (-p / SDK) sessions
Fable 5.1 快取全面升級,百萬脈絡壓縮不逾時
長文像貼了標籤的文件櫃,內容沒變就不必整箱搬出來重算。
``` prompt_cache # status line 欄位 model: fable # 代理設定 ANTHROPIC_DEFAULT_FABLE_MODEL # 綁定 /model claude-fable-5-1 # 完整指令 ```
輸入 /cost,或查看 status line(狀態列)的 prompt_cache 欄位時,快取未命中會標出原因,例如 tool definitions、system prompt 變更,或閒置超過 TTL。Claude Fable 5.1 先前沒把工具結果後的脈絡納入提示詞快取,所以每輪 tool-call 曾當未快取輸入重送;現在會納入。中途改 /effort 不再讓快取失效。上列 model: fable 代理不會再忽略綁定上的 [1m] 而默默改用 200K。組織若能用 Fable 5.1,/model 選單會顯示它;先前只能打上列完整指令。Opus 與 Fable 工作階段會在接近 100 萬 token(文字單位)上限前壓縮,極大脈絡時救援壓縮不再 10 分鐘超時。
官方原文
Added a likely cause for prompt-cache misses (e.g. tool definitions or system prompt changed, idle past the TTL) to /cost and the status line's prompt_cache field
Fixed model: fable agents ignoring the [1m] tag on an ANTHROPIC_DEFAULT_FABLE_MODEL pin and silently running with a 200K context window
Fixed the /model picker not showing Fable 5.1 for organizations that can use it, which was only accepted when typed as /model claude-fable-5-1
Fixed prompt caching on Claude Fable 5.1 not covering the context attached after tool results, so it was re-sent as uncached input on every tool-call turn
Improved auto-compact for 1M-context models: Opus and Fable sessions now compact shortly before the 1M-token limit, and recovery compaction on very large contexts no longer times out at 10 minutes
Improved /effort on Claude Fable 5.1 so changing effort mid-session no longer invalidates the prompt cache
權限規則精準解析括號,路徑比對嚴防破口
路徑含括號的 Edit、Write 或 Read 權限規則,以前曾被當成無效丟掉,或被 Bash 沙盒忽略,唯讀資料夾因此可寫。若出現未閉合中括號等無法編譯的正規表達式(regex,用符號比對字串的語法),所有檔案編輯都會報 Invalid regular expression。現在此類拒絕規則會退回保護其字面路徑。若在括號後誤加多餘文字(例如 Bash(ls) x),系統會直接回報設定無效而非默默忽略。Windows 例 Edit(C:\dir\(name)\**) 裡的 \( 會被讀成跳脫括號而非路徑分隔,錯誤訊息會建議明確寫法。此外,Glob 與 Grep 工具現在會先確認權限,才回報路徑是否存在。⟦食譜寫「高湯(雞骨或蔬菜)」時,括號裡的替代食材不該讓整份菜單從廚房消失。⟧
官方原文
Fixed Edit/Write/Read permission rules whose path contains parentheses being dropped as invalid or ignored by the Bash sandbox, which left "read-only" folders writable
Fixed one file permission rule with an uncompilable pattern (e.g. an unclosed [) making every file edit fail with Invalid regular expression; such a deny rule now guards the literal path it spells
Glob/Grep: Fixed the search path being probed on disk before the permission check; a missing path is now reported after permission is decided, as Read does
Improved the settings error for rules such as Edit(C:\dir\(name)\**), where \( is read as an escaped parenthesis rather than a path separator, to suggest an unambiguous spelling
Changed permission rules with text after the closing parenthesis (e.g. Bash(ls) x), which never matched anything, to be reported as invalid settings instead of being silently ignored
閘道支援桌面政策,自動阻擋巢狀欄位拼錯
閘道支援下列鍵:
``` oidc.scope_on_refresh # 範圍鍵 userPluginMarketplacesEnabled # Desktop 鍵 userPluginUploadsEnabled # Desktop 鍵 orgPluginSettings # 清單格式 ```
身分提供者若須再要 openid 才會在更新時給識別令牌,可設定 oidc.scope_on_refresh。更新失敗日誌也會具名失敗步驟。Bedrock 被中斷的請求改用 AWS 免費 CountTokens API 計算輸入 token,需授予 IAM bedrock:CountTokens,而非改送只含一個 token 的請求。兩把 Desktop 鍵寫在 desktop 政策區塊。orgPluginSettings 改以清單格式傳送,供 Claude Desktop 1.15200.0 起讀取;舊版忽略。若 desktop 政策在 MCP(外部工具協定)的 managedMcpServers 或 orgPluginSettings 巢狀物件拼錯欄位,啟動時會拒絕並指出該欄位。⟦欄位名拼錯就送不出,會標出錯格。⟧
官方原文
Added oidc.scope_on_refresh to the Claude apps gateway for IdPs that return an id_token on refresh only when asked for openid again
Added Claude apps gateway support for newer Claude Desktop keys in desktop policy blocks, including userPluginMarketplacesEnabled and userPluginUploadsEnabled
Improved the Claude apps gateway's refresh-failure log to name the step that failed
Improved the Claude apps gateway on Amazon Bedrock: input tokens for an aborted request are now counted with AWS's free CountTokens API (grant bedrock:CountTokens) instead of a one-token request
Changed Claude apps gateway to send orgPluginSettings in the list form read by Claude Desktop 1.15200.0 and later; older desktops ignore it
Changed Claude apps gateway to also refuse to start, naming the field, when a desktop policy misspells a field in a nested object of a managedMcpServers or orgPluginSettings entry
代理團隊通知精準送達,結構化輸出提早防呆
⟦在大型專案團隊中,各工種之間的傳令與交接必須精準到位,才不會因為聯絡簿被洗掉或回報送錯辦公室而造成混亂。⟧當子代理透過 SendMessage 喚醒另一個代理時,對方完成後的通知現在會正確送回給發起喚醒的子代理,不再誤送到主工作階段。代理團隊在 API 長時間重試等待時(例如處於 CLAUDE_CODE_RETRY_WATCHDOG),對話紀錄不會再被重試通知擠掉而洗白。執行工作流時,如果子代理正在進行長時間的脈絡壓縮,不會再被誤判為停滯而遭粗暴重啟。結構化輸出方面,Workflow 的 agent({schema}) 若遇到永遠無法滿足的 JSON Schema,會事先拒絕;達到重試上限時也會附上最後一次驗證錯誤。子代理啟動的背景指令取消了 1 小時限制,會執行到自己結束或被停止為止,並對齊主工作階段。
官方原文
Fixed a subagent that resumed another agent via SendMessage never being woken by that agent's completion (the notification went to the main conversation instead)
Fixed agent teams: an in-process teammate's transcript losing messages, or going blank, during long API retry waits (e.g. under CLAUDE_CODE_RETRY_WATCHDOG) as retry notices evicted real messages
Fixed Workflow tool subagents being restarted as stalled while a long context compaction was still in progress
Improved structured output: Workflow agent({schema}) rejects a JSON Schema that can never be satisfied up front, and retry-cap errors now include the last validation failure
Removed the one-hour time limit on background commands started by subagents; they now run until they exit or are stopped, matching the main session
背景工作階段防幽靈重影,工作樹安全清點防手滑
移至背景的工作階段不會再於 ListAgents 出現同名的 interactive 幽靈分身,檢視器也不再收到它的 SendMessage。多個工作階段共用同一個專案目錄時偶發的輸出交換錯誤也已修復。刪除帶有未推送提交的工作樹(worktree,Git 讓同一專案平行開多份副本的功能)背景工作階段時,第一次會報出分支名稱與提交數量,再執行一次刪除才會丟掉該工作樹。以 -p --resume 或 --continue 接續若遺失 Git 詮釋資料,失敗一次後會跳過工作樹繼續執行。自託管 runner 若設定了 --kill-session-after-min,遇到純粹等待使用者輸入的暫停狀態時會和平釋放,不會強制終止並報錯。⟦就像管理共用辦公區的臨時座位,分身不會重疊登記;桌上還有未歸檔文件會先清點,等候主人回覆也不會被直接清空。⟧
官方原文
Fixed -p --resume/--continue (as used by the desktop app) failing on every retry once a session's worktree directory lost its git metadata; it now fails once, then resumes without the worktree
Fixed a session that moved to the background appearing twice in ListAgents (once as a phantom "interactive" twin with the same name) and receiving SendMessage deliveries in the viewer
Fixed intermittent "task output swap refused" errors when many sessions share a project directory
Improved deleting a background session whose worktree has unpushed commits: the message now names the branch and commit count, and deleting again discards the worktree
Changed self-hosted runner --kill-session-after-min to release a session that is only waiting on its user (paused, resumable on the next message) instead of killing it and reporting a failure
技能精準保留選取行數,雲端審查等候更寬裕
⟦在編輯器裡呼叫專屬助理就像用螢光筆標出重點交給專家,選取的行數會原封不動交到對方手中。⟧IDE 選取的行數在觸發技能(skill)或斜線指令時不會再遺失,Claude 能收到 N lines selected 這句脈絡。受控設定的 skillOverrides 若以內建技能別名為鍵(例如用 checkup 覆寫 /doctor)已能正常生效,Skill(name) 拒絕規則也完整涵蓋了 <目錄>:名稱 形式的巢狀技能。內建的 claude-api 技能範例已更新 Go、Java 與 C# 程式碼至最新世代模型識別碼,並說明較便宜的 worker 或子代理模型也應採用新世代模型。雲端審查指令 /ultrareview 與 claude ultrareview 的等候時間上限從 30 分鐘延長至 45 分鐘。
官方原文
Fixed managed skillOverrides entries keyed on a bundled skill's alias (e.g. checkup for /doctor) not applying, and Skill(name) deny rules not covering a nested skill listed as <dir>:name
Fixed IDE line selections being dropped when running a skill or slash command (the "N lines selected" context now reaches Claude)
Improved /ultrareview and claude ultrareview to wait up to 45 minutes (previously 30) for long-running cloud reviews
Updated the bundled claude-api skill so its Go, Java, and C# samples use current-generation model IDs, and clarified that cheaper worker or sub-agent models should be current-generation too
VS Code 頁尾顯示努力程度,回應重試不留殘影
VS Code 擴充套件在介面顯示與工作階段管理上變得更加俐落。底部的模型標籤現在會直接顯示目前選擇的努力程度,切換模型後數值不再停留在舊狀態,且標籤尺寸已恢復為原本的緊湊大小。工作階段清單的狀態篩選選單中,新增了 Open 與 Closed 兩個選項,方便你快速分類與尋找專案。此外,Claude Code 對 dropped response 重試後,畫面不再留下半截訊息、空白工具卡或多餘的 Thought for 行。⟦就像把儀表板重新擦拭乾淨,開關檔位一目了然,重試後也不會留下半截殘缺的草稿。⟧
官方原文
[VSCode] Added the selected effort level to the footer model pill, fixed a stale effort level after switching models, and returned the footer pills to their earlier compact size
[VSCode] Added Open and Closed to the session list's status filter menu
[VSCode] Fixed a half-finished message, an empty tool card or an extra "Thought for" line staying on screen after Claude Code retried a dropped response
VS Code 智慧切換開啟分頁,遠端設定即時套用
在 VS Code 中操作多個分頁與遠端控制時的體驗更加順暢。在歷史工作階段選擇器中點選已在其他分頁開啟的工作階段時,編輯器會直接切換到該分頁,不再重複載入同一份對話。在分頁畫面重新整理期間執行重新命名(Rename)指令,系統現在會確實套用新名稱,不再無聲失效。新開啟工作階段時若自動啟動 Remote Control,歡迎畫面不會再莫名消失。此外,若在分頁剛啟動的當下切換「為所有工作階段啟用 Remote Control」,該設定現在能正確套用到正在初始化的分頁中。⟦好比辦公桌上的文件夾標籤與切換器,翻閱已打開的卷宗會直接引導至該分頁,新開的檔案盒也不會因為剛啟動就漏接全域開關。⟧
官方原文
[VSCode] Fixed the welcome screen disappearing in a new session when Remote Control turns on automatically
[VSCode] Fixed the session history picker loading a session a second time when it is already open in another tab; it now switches to that tab
[VSCode] Fixed the session tab's Rename command silently doing nothing while the tab's view was reloading; it now always applies
[VSCode] Fixed "Enable Remote Control for all sessions" not applying to a session tab that was still starting when the toggle was flipped
修正 4 項
手動指令跳脫沙盒束縛,精準攔截隱藏替換
你在終端機以驚嘆號 ! 開頭輸入的命令,即使嚴格沙盒 sandbox.allowUnsandboxedCommands: false 開著,也會在沙盒外執行,就如同自己開啟終端機鍵入一樣。
``` {"sandbox":{"allowUnsandboxedCommands":false}} permissions.blockReadsOutsideWorkingDirectories REPORTTIME REPORTMEMORY DIRSTACKSIZE ```
先前將 Read() 拒絕規則套到 Bash 參數的改動,曾在 Read(./**/build/**) 規則下於每個模式拒絕 npm run build,連自動模式的 cd … && grep 也會問;現已撤回,不再如此。macOS 開啟上列阻擋鍵時,沙盒 Git 不再讀不到使用者 git 設定檔,工作樹(worktree,Git 讓同一專案平行開多份副本的功能)隔離子代理也能存取自己的檢出目錄。zsh 若把指令替換藏在上列三個參數賦值裡,現在會要求核准。⟦自己在工作檯親手鍵入的步驟該直接做,工單備註裡偷偷夾帶的附加指令則要先問過才行。⟧
官方原文
Fixed Bash permission checks auto-approving zsh commands that hide a command substitution in a REPORTTIME, REPORTMEMORY or DIRSTACKSIZE assignment; these now prompt for approval
Fixed permissions.blockReadsOutsideWorkingDirectories on macOS hiding the user's git config from sandboxed git and hiding a worktree-isolated sub-agent's own checkout
Reverted the 2.1.259 change applying Read() deny rules to Bash arguments; it denied npm run build under a Read(./**/build/**) rule in every mode and made cd … && grep prompt even in auto mode
Changed commands typed at the ! bash-mode prompt to run outside the sandbox even when strict sandbox mode (sandbox.allowUnsandboxedCommands: false) is on, like typing into your own terminal
企業憑證無礙登入,受控檔案免重複核准
⟦公司人事系統裡正式員工與舊外包是兩組帳號,不該被舊的那組卡住;公佈欄上已核准的內規也不必每次再簽一次。⟧企業身分登入與伺服器託管設定在這次更新中變得更加清晰穩定。當公司的根憑證授權單位僅安裝在作業系統憑證庫時,AWS Bedrock 的模型偵測、token(AI 處理與計費的文字單位)計算與 AWS SSO/STS 呼叫不再因找不到發行憑證而失敗。使用 claude.ai 企業版或團隊版的成員,即使殘留先前 /login 留下的 API 金鑰,也能正常載入託管設定;輸入 /status 時會明確標示哪一組憑證正在生效、哪一組未被使用。伺服器下發的受控 CLAUDE.md,鍵名為 claudeMd,不再觸發安全核准對話框。掛鉤(hook,特定事件發生時被觸發的小程式)、Shell 指令、沙盒與不安全的 env 設定仍須核准。
官方原文
Fixed Bedrock model discovery, token counting and AWS SSO/STS credential calls failing with "unable to get local issuer certificate" when the corporate root CA is only in the OS certificate store
Fixed managed settings not loading for claude.ai Enterprise/Team users who also had a leftover API key from an earlier /login
Fixed /status listing a signed-in claude.ai account and a configured API key as if both were in effect; the credential not in use is now marked
Changed server-managed settings so a managed CLAUDE.md (claudeMd) no longer triggers the security approval dialog; hooks, shell-command, sandbox, and unsafe env settings still require approval
外掛載入不再卡死模型,瀏覽器連線更穩固
外掛掛鉤(hook,特定事件發生時被觸發的小程式)或組織外掛市集載入失敗時,切換模型不再把整段工作階段鎖死;每次切換都會重新檢查並標註拒絕原因。由 SDK 提供的 MCP(Model Context Protocol,讓 AI 連接外部工具的協定)伺服器不再於第一輪對話缺席,例如 Desktop connectors。雲端託管的 claude.ai 工作階段在增減連接器時,Claude in Chrome 工具不再於中途跳出 Not connected。若組織管理員關閉此功能,--chrome、/chrome 與瀏覽器工具會一併停用。從網址市集安裝外掛時,若主機應用程式(例如 Claude Desktop)把市集存成目錄,先前會失敗並出現:
``` marketplace entry path does not stay inside the marketplace directory ```
這就像音響擴大機更換訊號源時,即使某個外接插頭鬆脫,也不會導致整台機器永久死鎖而無法切換頻道。
官方原文
Fixed model switching staying blocked for the rest of the session after a plugin hook load failure; each switch now re-checks and the refusal names the cause
Fixed model switching being blocked for the session when an organization-managed plugin's marketplace could not be loaded
Fixed SDK-provided MCP servers (e.g. Desktop connectors) sometimes missing from the first turn and only appearing on the next one
Fixed Claude in Chrome tools failing with "Not connected" mid-task in cloud-hosted claude.ai sessions when a connector was added or removed
Fixed plugins from a URL marketplace failing to install with "marketplace entry path does not stay inside the marketplace directory" when a host app (e.g. Claude Desktop) stores it as a directory
Changed Claude in Chrome to follow your organization's Claude in Chrome admin setting; when an admin turns it off, --chrome, /chrome and the browser tools are unavailable
歷史回溯確實驗證備份,GitLab 連結不再誤指 GitHub
當你想透過 /rewind 或 --rewind-files 回溯專案狀態時,系統現在有了更嚴格的確認機制。若檢查點備份檔案遺失導致實際上未還原任何內容,系統不會再虛報成功;回溯後也不會殘留舊回合的讀取紀錄,避免外部修改檔案後發生誤判或重複塞入整個檔案。在遠端或桌面 App 工作階段中發布產出物時,不會再無故多彈出一個瀏覽器分頁,協作工作階段中產出物工具首次呼叫的參數驗證錯誤也已修正。針對使用 GitLab 的開發者,巢狀子群組的專案現在能被正確辨識為 GitLab 存放庫,終端機顯示的議題編號連結(例如 owner/repo#123)也會精確連往 gitlab.com 而非誤連至 GitHub。⟦這就像在記事本上按復原鍵,系統會確實檢查底稿存檔,不再假裝已經還原,也不會把隔壁頁的筆記目錄給搞混。⟧
官方原文
Fixed /rewind and --rewind-files reporting success when checkpoint backup files were missing and nothing was actually restored
Fixed /rewind leaving stale file-read tracking from the rewound-away turns, which caused "File unchanged since last read" stubs and full-file re-injection after external edits
Fixed an extra browser tab opening when an artifact is published in a session you're driving from claude.ai, the desktop app, or mobile (Remote Control)
Fixed the Artifact tool's first call failing with an "Invalid tool parameters" validation error in some Cowork sessions
Fixed repository detection for GitLab projects in nested subgroups (e.g. gitlab.com/group/subgroup/project)
Fixed owner/repo#123 issue references in rendered output linking to github.com when working in a GitLab repository; they now link to the gitlab.com issue