Claude Code 2.1.267
新功能 8 項
思考深度設定全面設限,自訂技能前言設定正式生效
想讓 Claude 深入推理又擔心 token(AI 處理與計費的文字單位)消耗過量,現在能透過 maxEffortLevel 設定為思考深度加上緊箍咒。⟦這宛如在跑車油門踏板下方加裝限速卡榫,無論開在哪條公路上都能限制最高轉速,駕駛依舊能輕踩慢行,自訂路線的定速指示也不會被車廠出廠預設忽略。⟧以前在 Bedrock、Vertex 與 Foundry 等不同雲端平台上,很難全面鎖定努力程度上限。現在無論在最外層或 modelSettings 針對個別模型指定,都能統一設限,且日常仍可自由選擇更低的努力等級:
```
{
"maxEffortLevel": "medium",
"modelSettings": {
"claude-opus-4-7": {
"maxEffortLevel": "low"
}
}
}
```
此外,自訂指令、技能或子代理在 YAML 前言中指定的 effort: 數值,先前在 Opus 4.7、Opus 4.8 與 Fable 5 等固定預設等級的模型上會失效,如今已修復並能正確生效。
官方原文
Added maxEffortLevel setting (top-level or per model under modelSettings): caps the effort level on every provider, including Bedrock, Vertex and Foundry; users can still pick a lower level
Fixed effort: frontmatter on custom commands, skills, and subagents being ignored on models whose default effort is still pinned (Opus 4.7, Opus 4.8, Fable 5)
系統提示詞支援即時重算,調校文案免重啟對話
正在反覆微調提示詞(prompt)卻苦於每次改動都得開新對話,新的 --system-prompt-snapshot off 旗標正是為此而生。當你在打磨自訂提示詞內容時,系統預設會沿用工作階段初次錄製的提示詞快照,導致你在外側修改了檔案文字,當前的對話依然讀取舊版內容。現在只要在啟動 Claude 時帶上這個選項,每一次發出提問都會重新讀取並渲染最新的系統提示詞,讓文案調校的測試過程變得更加靈活迅速。⟦整套流程好似在排練室試穿戲服,每次出場都當場換上最新修改的布料剪裁,不必每修一針就得解散劇組重新開演。⟧
官方原文
Added --system-prompt-snapshot off to render the system prompt fresh on every request instead of reusing the conversation's recorded prompt (for iterating on prompt text)
恢復工作階段沿用工具描述,背景任務不破壞提示快取
重新打開先前未完成的工作階段時,最怕背景暫存全部失效導致推論延遲。以前從對話分岔出的背景工作單元若把 EnterWorktree 這個工作樹(Git 讓同一專案平行開多份副本的功能)工具加進對話的工具清單,便會破壞快取重用機制。現在恢復工作階段時,不會再因 MCP(讓 AI 連接外部工具的協定)重連時間差而改寫工具清單或丟失思考,首回合執行工具時也能直接重播既有描述而非重新渲染。此外,從 -p 印出模式切換至互動模式時系統提示詞前綴保持一致。透過 --system-prompt 或 --append-system-prompt 啟動的子代理與工作階段,也會一次記錄提示詞與工具定義,不再每次重新渲染。⟦延續同一個會議記錄思維,這就像隔天回到會議室復工時,直接對照昨天蓋印封存的會議底稿接續討論,不會因為助手分頭跑腿或翻開備份記錄就擅自撕掉前言。⟧
官方原文
Fixed a background worker forked from a conversation adding EnterWorktree to the conversation's tool block mid-session, which broke prompt-cache reuse
Fixed resumed sessions rewriting the inline tool set when an MCP connector reconnects at a different moment than before
Fixed resumed sessions re-rendering tool descriptions instead of replaying the recorded ones when the first turn ran a tool
Fixed resumed sessions rewriting earlier MCP tool announcements (and dropping extended thinking) before their connectors reconnect
Fixed a prompt-cache break when a print-mode (-p) conversation is resumed interactively: the system prompt prefix no longer changes
Improved prompt-cache stability: subagents and sessions started with --system-prompt or --append-system-prompt now record the system prompt and tool definitions once instead of re-rendering them
工件發布支援斷線自動重試,明確指出損壞字元行數與欄位
發布工件(artifact,在獨立視窗展示的成果文件)若中途網路斷線或遇到格式錯誤,現在不再只回傳不明原因的失敗代碼。在過去,如果上傳檔案時連線中斷,Claude Code 往往只能回報未知結果;如今只要判定傳輸未完成,就會自動重試 1 次以確保順利送達。當頁面檔案並非有效的 UTF-8 編碼,或是包含代表損毀的替換字元(U+FFFD)時,錯誤訊息也不再模糊帶過,而是會具體標示出需要修正的行數與欄位。若工件發布遭到拒絕,畫面亦會清楚解釋被拒原因以及具體的應對處置方法。⟦這套防護有如印刷廠送件作業,遇到斷線能自動重發一次,內容包含損壞字元時會明確指出第幾行第幾列,被拒絕出版時也會清楚說明退件原因與修改方針。⟧
官方原文
Fixed artifact publishes cut off by a dropped connection mid-upload: they now retry once when Claude Code can tell the upload never completed, instead of reporting an unknown outcome
Fixed artifact publish failing with an unhelpful error when the page file isn't valid UTF-8 or contains a replacement character (U+FFFD); the error now names the line and column to fix
Improved Artifact tool publish errors: when a publish is refused, the message now says why and what to do about it
恢復大容量歷史對話不掉內容,用量警示燈號穩定顯示
恢復先前對話或載入超過 5 MB 的超大歷史紀錄時,整個還原過程變得更乾淨迅速。以前在包含大量 Bash 工具呼叫的對話中執行 --resume,首次渲染畫面常需等待;現在首次渲染更快。當工作階段的對話紀錄超過 5 MB 時,先前重新載入對話容易漏失平行工具呼叫與掛鉤(特定事件發生時被觸發的小程式)輸出,如今資料都能完整重現。透過 -p --resume 執行 /compact 壓縮或其他斜線指令後,對話中也不會再多生出一筆多餘的接續提示。如果工作階段中因切換不同模型或模式而回傳不同的額度週期,用量上限警示也不會再忽明忽暗地閃爍。⟦整個載入流程好比翻開厚重的歷史卷宗,即使檔案超過 5 MB 且包含多條平行批註也能完整讀取,恢復作業時不再無故多插一張空白備忘頁。⟧
官方原文
Fixed resuming a session after /compact or another slash command ran via -p --resume: a spurious "Continue from where you left off." turn is no longer inserted
Fixed resuming a large session (transcript over 5 MB): parallel tool calls and their hook output are no longer dropped from the reloaded conversation
Fixed the usage-limit warning flickering on and off during a session when requests for different models or modes report different limit windows
Improved --resume first-render time for sessions with many Bash tool calls
終端指令回傳白話說明,市集路徑防護與沙箱複製指引
讓 Claude 在自動模式或沙箱環境執行工作時,工具的引導說明與安全把關變得更親切嚴謹。以往執行終端命令時,Claude 常只是機械式複誦指令;現在更新了 Bash 工具說明指引,引導它用大白話解釋命令的作用。在沙箱內若遇到 pbcopy 等剪貼簿指令執行失敗,Claude 會主動建議改用內建的 /copy 指令。工作流程中帶有龐大輸出結構的 agent() 呼叫,在自動模式下不再直接被拒,而是交由安全分類器審查。在 macOS 與 Linux 上,外掛市集路徑帶有反斜線可繞過邊界檢查的漏洞已堵死;claude agents 的 @ 選單也能即時列出工作階段開啟後新建立的儲存庫。⟦這如同給領航員換上更清晰的作業指南,執行指令時會用白話解釋步驟,遇到封閉環境複製失敗時也會主動推薦替代指令。⟧
官方原文
Fixed Workflow agent() calls with large output schemas being refused in auto mode instead of being checked by the safety classifier
Fixed a case where a marketplace entry path containing a backslash could bypass the containment check for fetched marketplaces on macOS and Linux
Fixed claude agents @ directory menu not listing repositories created after the session started
Improved the Bash tool's description guidance so Claude describes what a command does in plain words instead of echoing the command
Improved sandbox guidance so Claude suggests /copy when clipboard commands such as pbcopy fail inside the sandbox
[Claude Code on the web] 企業版 GitHub 授權自動換新,調度本人帳號備援呼叫
透過網頁版 Claude Code 操作 GitHub 企業伺服器時,逾期的 token(授權令牌,用於身分認證)現在會自動換新。⟦這宛如在雲端工作台配置全天候秘書,遇到通行權杖逾期會自動換發,即使所屬單位未安裝官方擴充套件,也能直接採用你本人的帳號順暢銜接。⟧先前在 GitHub Enterprise Server 的工作階段中,只要個人認證憑證到期,介面就會誤標為帳號已斷線;如今在進行拉取請求(PR)或討論議題操作時,系統會自動在背景刷新授權並保持連線。另外,在尚未安裝 Claude GitHub App 的組織架構下,執行 gh 命令或呼叫 API 原先會直接報錯,現在會直接改用你已綁定的 GitHub 帳號發送請求,若尚未登入也會明確提示。
官方原文
[Claude Code on the web] Fixed GitHub Enterprise Server sessions showing your GitHub account as disconnected once its token expired; PR and issue operations now refresh it automatically
[Claude Code on the web] Fixed gh and GitHub API calls failing in organizations without the Claude GitHub App; they now use your connected GitHub account and say so when none is connected
[Claude Tag] 預設連線支援切換自訂通道,額度耗盡清楚指引儲值
負責管理 Claude Tag 團隊連線的管理者,現在不必刪除重來就能將預設通道切換至自訂連接器。在後台設定預設連線表單時,新加入的「Use a custom connector」連結允許你中途直接轉向自訂通道。當團隊組織的用量額度耗盡時,Claude 過去只會冰冷回報 API 拒絕了無效請求,現在會具體說明額度已用完並指引儲值方法。在頻道頂層發布訊息後,成員在討論串內要求編輯或刪除該則貼文時,指令不再被誤判為對話糾錯,而是確實轉交給當初發文的工作階段處理。此外,管理審查介面的工具存取授權請求點擊「Connect」時,之前常跳出授權失敗或誤報授權包已刪除的問題也已修正。⟦整個調整就像在團隊客服總機後台增加切換自訂外線的捷徑,額度用盡時明確告知儲值途徑,留言串內的修改請求也能準確遞交給當初發文的專員。⟧
官方原文
[Claude Tag] Added a "Use a custom connector" link to the preset connection forms in Claude Tag admin settings, so you can switch to a custom connection without starting over
[Claude Tag] Fixed Claude replying "The API rejected the request as invalid" when the organization has run out of usage credits; the reply now says so and explains how to add more
[Claude Tag] Fixed thread requests to edit or delete a message Claude posted at the channel's top level being answered with a correction instead of reaching the session that posted it
[Claude Tag] Fixed **Connect** on Tool access requests under Admin settings > Review requests failing with "Authorization failed" or showing the requested access bundle as deleted
修正 6 項
外部工具異動保全推論思考,切換模型快取不漏接
當你請 Claude 呼叫外部工具或中途切換模型時,先前辛苦推導的思考脈絡不再無端消失。⟦這好比多位專家在會議室白板上記錄解題推導,中途就算外聘顧問進出或更換麥克風,也不會突然把整面黑板的心算擦掉重抄。⟧以往 MCP(讓 AI 連接外部工具的協定)伺服器重送模型已載入的工具、內建工具重繪,或工具因斷線升級而消失時,清單重寫往往會丟失先前的思考內容;如今推論皆能妥善保留。在未開啟工具搜尋的工作階段中,外掛動態加入也會改以延遲定義傳遞,避免破壞快取(把算過結果暫存起來直接用)複用。透過 /model 切換模型時不再重發全部工具定義;commit 與 PR 的歸屬文字改以對話附註送達,並會在切換模型時更新,且 claude.ai 連接器工具在工作階段更動時也能保住推論記憶。
官方原文
Fixed earlier reasoning being dropped when an MCP server re-sends, or a built-in tool re-renders, a tool the model already loaded
Fixed a tool that disappears mid-conversation, from a disconnected MCP server or an upgrade, rewriting the tool list and discarding earlier thinking
Fixed mid-session MCP and plugin tools being added to the tool list in sessions without ToolSearch, which broke prompt-cache reuse; supported models now receive them as deferred definitions
Fixed switching models with /model re-sending every tool definition (a prompt-cache miss); commit and PR attribution text now arrives as a conversation note that updates on model changes
Fixed prompt-cache misses and dropped extended thinking when a claude.ai connector's tools change between a session and its resume
遠端操控憑證過期自動續期,及時同步桌面與編輯器權限
在遠端電腦透過 claude remote-control 連線工作時,長時間掛機最怕憑證失效讓所有連線瞬間中斷。⟦這如同在長效監控哨所配置專用通信機,遇到月度密碼過期會自行向總部換約重連而不斷線,新加入的聯絡終端也能即時掌握目前的防衛等級。⟧以往遠端伺服器憑證在大約 30 天過期後,主機行程會直接退出並切斷所有掛載的工作階段;現在主機端會自動重新註冊憑證並持續保持運作。同時,新加入 Claude Desktop 或 VS Code 工作階段的遠端操控客戶端,之前常停留在過期的舊權限模式直到手動變更,如今一連上就能立刻呈現即時且正確的權限狀態。
官方原文
Fixed Remote Control clients that join a Claude Desktop or VS Code session showing a stale permission mode until it was changed again
Fixed claude remote-control exiting and dropping every attached session when its server credential expires (about 30 days after start); the host now re-registers and keeps going
企業受管設定嚴密把關,雲端憑證逾期精確回報
在由公司統一控管規則的企業環境中,雲端排程與登入驗證具備更嚴密的防護。受管設定要求沙箱時 Cowork 雲端排程啟動失敗已修復;allowedHttpHookUrls、httpHookAllowedEnvVars 與 allowedChannelPlugins 讀取失敗時一律不予放行。在 Claude Desktop 下 AWS 或 Google Cloud 憑證過期不再盲目重試 10 次,改為提示重新認證;強制閘道登入框按 Esc 即可關閉。自建執行端會回報 --use-anthropic-git-proxy 並對使用舊代理的工作階段提出警示,轉發身分遇 429 限制不再轉移上游以落實每人配額。⟦整體防護宛若金融大樓的安全閘道,條文讀取不清時一律從嚴封鎖,身分過期不再盲目空轉十次,限制也確實落實到每位個別訪客頭上。⟧
官方原文
Fixed Cowork scheduled tasks in the cloud failing at startup for organizations whose managed settings require sandboxing
Fixed expired AWS or Google Cloud credentials under a host app such as Claude Desktop retrying ten times with a generic "request failed" before the re-authenticate error appeared
Fixed managed allowedHttpHookUrls, httpHookAllowedEnvVars and allowedChannelPlugins to admit nothing, not everything, when unreadable
Fixed /login on machines whose managed settings require Claude apps gateway sign-in: Esc now closes the dialog instead of doing nothing
Self-hosted runner: Changed --use-anthropic-git-proxy to be reported to the server at registration and to print a warning for each session that still clones through the legacy git proxy
Gateway: Changed forward_user_identity upstreams to return a 429 as-is to a developer whose email was forwarded, instead of failing over to the next upstream, so the proxy's per-user limits hold
終端機按鍵與滾動修復,輸入文字不再延遲跳格
在手機或終端機全螢幕下操作各項指令,文字輸入與介面捲動現在更加乾淨俐落。⟦這恰似把老舊放映機的齒輪重新校準,打字輸入不再因為背景動畫轉動而延遲跳格,切換視窗或滑動閱覽時畫面資訊也穩定呈現。⟧以前在代理人檢視中重新連線至 tmux 或 ssh 工作階段後,Shift+Enter 換行與 Option+Backspace 刪除單詞等快捷鍵會失效,如今已完全修復。行動端設備執行 /context 等本機指令時輸出空白的問題已獲解決,在全螢幕向上滾動時,對話頂端也能正常顯示淡色的上一則提問提示。此外,/diff 程式碼差異面板不再先閃爍零個檔案變更與載入轉圈才定格,無改動時的空白提示也已置中對齊,打字時按鍵更不會被載入動畫卡住延遲。
官方原文
Fixed /context and other local command output rendering blank on mobile clients
Fixed shift+enter and option+backspace not working after reconnecting to a tmux or ssh session inside an agent view
Fixed the dim last-prompt header not appearing at the top of the conversation when scrolling up in fullscreen mode
Improved the /diff panel: it no longer flashes "0 files changed" and a spinner before settling, and its empty state is centered in the panel
Improved prompt input responsiveness: keystrokes no longer occasionally wait a frame behind spinner or streaming repaints
[VSCode] 差異檢視跟隨編輯器主題,修復截圖貼上與多語系文字
在 VS Code 裡與 Claude 對話,程式碼差異對照面板現在能完美貼合你的編輯器主題。⟦體驗改善有如為繪圖板換上具備自動調色的多功能畫布,不管是貼上圖片、選用高對比深淺外觀,或是處理帶有空格的檔名,筆觸都精準無誤。⟧過去對話框中的變更區塊總是強制以深色佈景顯示,現在會同步套用當前啟用的色彩主題與高對比模式。在 WSL2 或 WSLg 環境下貼上螢幕截圖時,不再把原始圖片位元組塞進輸入框,而是直接轉成附件或自動略過;同時修復了混合由右至左語系與英文時文字順序錯亂的問題。在檔案修改方面,採 Windows(CRLF)換行格式的檔案在確認套用變更時不再噴出找不到字串的錯誤,且使用 @ 提及檔案時也不會漏掉路徑帶有空格的檔案。
官方原文
[VSCode] Fixed pasting a screenshot on WSL2/WSLg inserting raw image bytes into the chat input; the image is now attached when the clipboard provides it, otherwise the paste is ignored
[VSCode] Fixed chat diff blocks always rendering with a dark editor theme; they now follow the active VS Code color theme, including high contrast
[VSCode] Fixed mixed right-to-left and English text rendering in the wrong order while typing in the message input
[VSCode] Fixed accepting an edit in the diff view on a file with Windows (CRLF) line endings failing with "String not found in file"
[VSCode] Fixed @-mentions dropping files whose paths contain spaces
[VSCode] 遠端工作階段清單載入修復,排除循環歷史與行程空轉
開啟含有大量捷徑或龐大專案的遠端主機時,VS Code 擴充套件不再因循環紀錄或檔案搜尋而把 CPU 衝上 100%。過去當對話存檔中包含循環的父層關聯時,進行對話分支、編輯歷史訊息或執行倒轉操作會導致外掛主機直接卡死在 100% CPU,現已修復。透過 Remote-SSH 連線且工作區資料夾僅存在於遠端電腦時,工作階段清單介面過去會載入失敗,目前已能正常顯示。此外,在超大型專案或含有密集符號連結(指向另一個位置的捷徑檔)的工作環境中檢視檔案時,背景搜尋工具 ripgrep 行程失控狂飆的問題也獲得了解決。⟦承接同一個工作環境的平穩運作,這好似為巡檢機具加裝轉速調節器,遇到跨主機遠端連線或大量捷徑檔案時不再失控空轉。⟧
官方原文
[VSCode] Fixed the extension host hanging at 100% CPU when forking, editing an earlier message, or rewinding in a conversation whose saved transcript contains a cyclic parent link
[VSCode] Fixed the sessions list view failing to load in windows connected over Remote-SSH when the workspace folder exists only on the remote host
[VSCode] Fixed runaway ripgrep processes when viewing files in large or symlink-heavy workspaces