usage

Claude Code 2.1.312

工具與目錄
在這頁

新功能 12 項

01

應用程式閘道支援自訂 OIDC 欄位辨識使用者

企業為內部工具設定單一登入時,各家身分識別系統採用的欄位往往不太一樣。Claude 應用程式閘道新增了 oidc.user_id_claim 設定鍵,允許管理者透過 sub 以外的宣告來辨識人員身分,例如 Microsoft Entra ID 常用的 oid。⟦跟寄物櫃取件一樣,以前驗證系統硬性規定只認預設單號,現在能指定改認會員編號來辨識每位使用者。⟧這讓你在使用身分權杖(id_token,用於驗證身分的授權令牌)時,不再受限於預設識別碼,只要指定 oid 這類欄位,就能用它來辨識使用者。

官方原文

Added oidc.user_id_claim to the Claude apps gateway, to identify people by an id_token claim other than sub, such as Microsoft Entra ID's oid

02

全螢幕模式支援點擊提示立即送出排隊訊息

當你開啟全螢幕讓 Claude Code 專心執行長任務時,常會順手在底下排入下一段想問的內容。在全螢幕模式下,排隊中的訊息下方會顯示「立即送出(to send now)」提示字樣,現在直接拿滑鼠點擊這行提示,就能跟按鍵一樣立刻把訊息送出。⟦像在得來速排隊點餐一樣,以前只能等候依序叫號處理,現在只要輕點取餐口提示燈就能立刻把訂單送進廚房。⟧當你單手拿著滑鼠瀏覽輸出畫面時,不必再把手移回鍵盤摸索快速鍵,直接在畫面上點一下就能接續對話。

官方原文

Added click to send: in fullscreen, clicking the "to send now" hint under a queued message sends it right away, as its key does

03

思考力度顯示以生效值為準,並精準提示設定與快取重新讀取時機

在任務執行中途調整思考力度或切換模型時,狀態列上的提示現在能更誠實地反映背後進度。以前在任務中途變更思考力度,等待旋轉圖示、OpenTelemetry 遙測數據與對話紀錄會搶先顯示新選取的數值;現在一律顯示當前真正生效的層級。輸入提示區的思考力度指示器也獲得改善,任務中途修改時會提示可能需等下一則訊息生效,一旦生效提示就會自動清除。此外,/model 與 /effort 的快取(暫存,把算過與查過的資料存起來重複使用)警告文字原本稱重新讀取必須等待下一則訊息,現在若在 Claude 工作期間變更,系統能提早觸發重新讀取。⟦如同開車切換行車模式,儀表板不會在剛撥動旋鈕時就虛報已生效,而是等變速箱真正換檔完畢才亮起新燈號。⟧

官方原文

Fixed the spinner, OpenTelemetry effort values and transcripts naming a newly picked effort level during a task before the model applied it; they now show the level in force

Fixed the /model and /effort cache warning saying the re-read waits for your next message; a change made while Claude is working can trigger it sooner

Improved the prompt's effort indicator: a change made mid-task now says it may wait for your next message, and the note clears when it no longer applies

04

第三方雲端部署自訂模型採用精簡提示,並納入拒絕備援切換

使用 Amazon Bedrock、Google Cloud Vertex、Foundry 或 Mantle 連接 Claude Code 時,許多企業會替模型取自訂部署名稱。針對這類無法識別的模型名稱,包含自訂部署名或推論設定檔 ARN,即使底層是 Sonnet 或 Haiku,現在也會採用較短的系統提示詞。若想維持完整提示詞,可設定環境變數:

``` CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 ```

當訊息觸發安全標記後的自動模型切換,現在也同步涵蓋這些自訂模型名稱。若要關閉這項備援機制,可加入設定:

``` CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 ```

⟦正如外派特使持特殊身分出勤,通關時先給精簡版身分照會以免耽誤驗證,遇到緊急狀況也同樣享有備援安排。⟧這樣自訂部署名稱也會比照辦理。

官方原文

Changed Bedrock, Vertex, Foundry and Mantle to use the shorter system prompt for model names Claude Code doesn't recognize, such as custom deployment names and inference profile ARNs, even when they front Sonnet or Haiku; set CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0 to keep the full prompt

Changed automatic model switches after a flagged message to also cover model names Claude Code doesn't recognize, such as custom deployment names; set CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 to turn them off

05

限制工作階段掛鉤並行上限,並允許子代理縮小自動壓縮視窗

為專案串接大量自動化檢查流程時,頻繁觸發的事件可能會同時佔用系統大量背景運算資源。現在每個工作階段在包含所有子代理的情況下,輸入提示與代理人掛鉤(特定事件發生時被觸發的小程式),同時間最多只能執行 24 個,外加最多 12 個等待時間超出該事件逾時長度的掛鉤。⟦仿效遊樂園熱門設施的管制閘門,同一時段只准固定名額進場以免擠爆動線,各分館還能自行縮短排隊等待時間。⟧如果設定的逾時低於 1 秒會以 1 秒計算;子代理的 autoCompactWindow 也能調低全域設定 CLAUDE_CODE_AUTO_COMPACT_WINDOW,讓子代理提早壓縮對話歷程,但依然無法將其調高。

官方原文

Changed prompt and agent hooks to run at most 24 at a time per session, sub-agents included, plus at most 12 that have waited longer than their event's timeout; a timeout under 1 second now counts as 1 second

Changed a subagent's autoCompactWindow to lower the window set by CLAUDE_CODE_AUTO_COMPACT_WINDOW, where it had no effect before; it still never raises that window

06

遙測指標如實標註市集外部工具名稱,並移除多餘安全事件

負責監控系統運作狀態的工程團隊,現在能從日誌中更精確掌握各項外掛工具的調用情形。官方市集宣告的固定網址遠端 MCP(讓 AI 連接外部工具的協定)伺服器,屬性 mcp_server.name 不再顯示為 custom,而是回報真實名稱。⟦比照公司訪客名冊的登記方式,經過認證的特約包商會直接印出真實行號,不再一律以臨時外包商統稱標註。⟧同時,Claude Code 已經停止發送 claude_code.safety_event 遙測事件,讓維運人員在排查追蹤鏈時減少多餘雜訊。

官方原文

Changed OpenTelemetry mcp_server.name to report the real name of fixed-URL remote MCP servers declared by plugins from the official Anthropic marketplace, instead of custom

Changed Claude Code to stop sending the claude_code.safety_event OpenTelemetry event

07

VS Code 擴充套件完善組織設定載入,額度重設明確標註鐘點時間

於 VS Code 編輯器內使用 Claude Code 擴充套件時,企業帳號的登入與授權狀態現在變得更清楚。以前從擴充套件完成登入後,後續的工作階段可能會遺漏抓取受管理的組織設定與公司原則;現在登入後會完整同步。若在啟動階段遇到組織設定載入失敗或被拒絕,終端機分頁不再只拋出冷冰冰的結束代碼就突然關閉,而是會明確寫出失敗原因,並直接提供「重試」與「重新登入」兩個按鈕。此外,當觸發用量限制時,重設提示會明確寫出「5 小時限制」,並附上像「下午 3:10 重設」這類具體的鐘點時間,方便安排後續工作。⟦比方專案成員在內部簽核系統登入,身分驗證卡住時視窗會顯示具體原因並附上重試按鈕,重設等待時間也直接換算成幾點幾分。⟧

官方原文

Fixed managed settings and organization policy not being fetched for the rest of the session after signing in from the VS Code extension

[VSCode] Fixed sessions ending on a bare exit code when your organization's settings couldn't be loaded or were refused at startup; the tab now says why and offers Retry or Sign in again

[VSCode] Changed usage limit resets to show a clock time ("Resets at 3:10 PM") and to say "5-hour limit"

08

雲端例行工作支援設定思考力度,安裝腳本框升級專用編輯器

管理在雲端定期排程執行的例行任務時,設定介面與編輯流程現在操作起來更加順手。在建立或修改雲端例行工作(routine)時,模型選單新增了思考力度選項,方便指定任務需要的推理深度。在雲端環境設定中,安裝腳本區塊升級為具備語法色彩標示、行號以及複製按鈕的專用 Bash 編輯器。在互動流程方面,於例行工作清單點選編輯時,不會再發生只跳轉頁面卻沒彈出編輯視窗的問題。如果建立雲端環境失敗,錯誤訊息也會直接顯示在對話視窗內,不再只飄在對話框外的角落提示。⟦恰似在線上表單填寫報修單,遇到錯誤時提示會直接標在填寫框旁,安裝腳本區也換成了帶行號的高級專用筆記欄。⟧

官方原文

[Cloud sessions] Added an effort level to the model picker when you create or edit a routine that runs in the cloud

[Cloud sessions] Added a Bash editor with colors, line numbers and a Copy button to the setup script box in cloud environment settings

[Cloud sessions] Fixed a failed cloud environment creation showing its error only as a toast outside the open dialog; it now appears inside the dialog

[Cloud sessions] Fixed Edit in a routine's menu on the Routines page going to the routine's page without opening its edit dialog

09

雲端工作階段採用伺服器命名,釐清連線限制並以表格呈現程式碼庫

透過指令列建立遠端雲端任務並抓取網路資料時,錯誤訊息與執行歷程現在呈現得更清楚。從終端機 CLI 啟動的雲端工作階段,工作階段名稱與分支名稱現在統一由伺服器端配發。當 Claude 將專案程式碼庫加入雲端時,展開該步驟會以結構清楚的簡短表格呈現結果,不再直接倒出雜亂的 JSON 原始碼。若連線失敗後不改文字直接重新發送訊息,先前偶爾會重複執行兩次的問題已獲得修正。此外,在雲端工作階段使用網路擷取功能時,若目標主機無法解析,提示會直接說明該主機可能不在允許的網域清單內,並指名需要放行的主機名稱。⟦同向遠端辦公室派發工單一樣,信件編號全由總部統一編發,包裹清單用整齊表格列出,遇到收件地址受阻也會寫明需開通的路名。⟧

官方原文

Improved WebFetch errors in cloud sessions: a host that does not resolve is now explained as possibly outside the allowed network domains, so Claude names the host to allow

Changed cloud sessions started from the CLI to get their names and branch names from the server

[Cloud sessions] Improved the step shown when Claude adds a repository to a cloud session: opening it now shows a short table of what happened instead of raw JSON

[Cloud sessions] Fixed resending an unchanged message after a failed send in a cloud session sometimes running it twice

10

遠端控制連線中斷後狀態如實標註為閒置

若暫時將電腦休眠或切換網路,遠端工作階段面板的運作狀態現在不會再給出錯誤資訊。以前未封存的遠端控制工作階段在連線中斷後,會一直停留並顯示為「工作中(working)」,直到電腦重新連線為止。現在這個問題已經修好,中斷連線時會直接切換為「閒置(idle)」狀態,讓你一眼確認連線已暫停。⟦跟辦公室的通話燈號一樣,以前電話掛斷後燈號還死抓著通話中不放,讓人誤以為對方還在線上;現在斷線立刻亮起待命燈,狀態一清二楚。⟧

官方原文

[Remote Control] Fixed an unarchived Remote Control session showing as working until a computer reconnected; it now shows as idle

11

Slack 頻道轉公開保留專屬設定,精確投遞檔案並具體說明重試原因

團隊在 Slack 平台中透過標籤呼叫 Claude 時,各頻道的專屬設定與多討論串回覆現在更加穩定。以前當舊的私密頻道轉為公開並換發新編號時,頻道的開關狀態與自訂代理人設定會意外跌回工作區預設值,現在設定將完整保留。同時,當環境的網路連線設定為 None 時,先前 Claude 完全無法回覆的問題也已修好。如果在同一個頻道的不同討論串同時互動,過去偶爾會把檔案上傳到錯誤的討論串,現在投遞位置已獲得修正。此外,API 失敗的重試通知不再只顯示抽象錯誤,而是會具體說明是哪個模型正在回應,或明確指出是觸發了頻率上限。⟦類似團隊通訊群組的分流派工,群組轉公開時原本的專有權限不會被強制重置,傳送附件也能準確投遞到對應的發言話題底下。⟧

官方原文

[Claude Tag] Improved Claude Tag's retry notice in Slack to name the model in use, or say rate limits were hit, instead of a generic API error

[Claude Tag] Fixed a Claude Tag channel's on/off switch and agent settings falling back to workspace defaults when an older private Slack channel goes public and gets a new ID

[Claude Tag] Fixed Claude in Slack not replying in channels whose environment has network access set to None

[Claude Tag] Fixed Claude in Slack sometimes posting a file in the wrong thread when it was answering in another thread of the same channel

12

程式碼審查確保檢查最新提交,消除事件延遲引發的漏審

開發團隊向 GitHub 送出程式碼拉取請求時,偶爾會遇到平台事件通知延遲送達的情況。以前若 GitHub 延遲推送事件,程式碼審查(Code Review,自動檢查程式碼品質的工具)可能會去審查過期的舊提交,甚至完全略過檢查。現在這個問題已經修好,審查工具一律以 Pull Request 當前最新的提交內容為準。⟦就像助教批改作業,以前若收件通知晚送達,助教可能會拿出過期的舊草稿甚至漏改;現在一律核對抽屜裡最新繳交的版本,不再看錯稿件。⟧

官方原文

[Code Review] Fixed Code Review reviewing an outdated commit, or none at all, when GitHub delivered a push event late; it now reviews the pull request's current commit

修正 4 項

13

寫入工具防止截斷大檔,避免覆寫專案規則與引用的檔案

如果專案根目錄或子目錄裡的 CLAUDE.md、規則檔或 @ 引用的設定檔內容很長,你可能會擔心模型改動檔案時遺失後續內容。以前 Claude 在只看見檔案開頭的情況下,偶爾會直接覆寫子目錄中體積龐大的規則檔或引用檔案。⟦好比校對厚重合約時,以前助理只翻了首頁就直接重寫整份文件,現在校對規則要求必須讀完全本或在原處訂正。⟧這個問題已經修好,寫入工具(Write 工具,專門建立或覆寫檔案的工具)現在會要求 Claude 讀完整份檔案,或就地編輯,不再隨意整份覆寫。

官方原文

Fixed Claude overwriting a very large CLAUDE.md, rules file or @-included file in a subdirectory after seeing only its start; Write now asks Claude to read it all or edit in place

14

終端機輸入與 Vim 編輯修復,離開與刪除游標行為更精確

習慣在終端機內快速敲擊鍵盤指令的使用者,有時會遇到游標與編輯狀態未能即時更新的小困擾。現在幾處輸入問題已獲得修復。在 Agent 檢視畫面中,如果離開前剛用 Ctrl+C 清空了輸入文字,下次啟動時不會再莫名其妙恢復那些文字。如果從空的 ! 輸入列按下 Ctrl+D 離開,下次重新開啟時也不會再次誤進入 Shell 模式。另外,在 Vim 編輯模式下,使用 d、c 或 y 搭配 gj 或 gk 且指定行數大於剩餘行數時,以前會誤刪或誤複製文字,現在比照標準 Vim 行為,只單純移動游標。⟦就像在打字機前清空草稿夾,撕掉的廢紙不會在下次開機時重新夾回滾輪,跳過空白行時也不會誤裁紙張。⟧

官方原文

Fixed agent view restoring input text on the next launch after it was cleared with Ctrl+C just before exiting

Fixed agent view reopening in shell mode after exiting with Ctrl+D from an empty ! input

Fixed vim mode d, c and y with a gj or gk count larger than the lines left deleting or copying text; like Vim, they now only move the cursor

15

深入目錄仍能識別自訂技能,指令選單與載入機制修復

跨多個專案目錄切換工作時,自訂的自動化技能與指令選單現在能更穩定地維持運作。以前在 Git 儲存庫中透過 Bash 執行 cd 切換到深層子目錄後,個別目錄專用與 paths: 設定的自訂技能會找不到,現在即使切換路徑也能正確識別。如果存在名稱不合法的自訂指令,過去會導致所有指令全部停止載入,甚至讓 claude -p 無法輸出任何內容,這個載入中斷問題已經修好。此外,/verify 指令在 /help 與 / 選單中,原本會誤顯示專供 Claude 閱讀的冗長說明,現在已經改為精簡白話的短描述。⟦有如百貨商場的各樓層導覽手冊,即使走進地下街也能查到專櫃位置,單一店家登記有誤也不會讓整面導覽看板黑屏。⟧

官方原文

Fixed per-directory and paths: skills not being found after a Bash cd deeper into a git repository

Fixed a command with an invalid name stopping all commands from loading, which could leave claude -p with no output

Fixed /verify showing a long description meant for Claude in /help and the / command menu instead of a short one

16

釐清工作階段等待狀態與額度名稱,修復歷程恢復與暫存清理衝突

重新開啟先前的對話或接續處理工作時,狀態清單與對話歷程現在能更忠實反映真實情況。過去在終端機恢復工作階段(session,代表一次完整的對話歷程)後,極端情況下首則回覆可能在下一次恢復時消失,這個問題已經解決。同時,讀取工具處理 PDF 頁面時,若恰好碰上舊工作階段檔案清理,不再報出影像寫入失敗錯誤。若最後一則訊息僅在句中順便提及需要等待的項目,工作階段清單也不會再誤判為正在等待你回應。此外,用量上限提示正式將 5 小時窗口稱為「5 小時限制」,取代容易讓人誤會的「工作階段限制」。⟦宛若病歷檔案室的借閱管制,清理過期文件時不再誤抽借閱中的報告,候診名冊也不會因為隨口提及等待而誤掛紅牌。⟧

官方原文

Fixed a rare case where the first reply after resuming a session in the terminal could be missing the next time the session was resumed

Fixed the Read tool sometimes failing on PDF pages with "pdftoppm failed: Could not write image" when the clean-up of old session files ran at the same time

Fixed some sessions showing as waiting on you when the last message only mentioned items waiting on you mid-sentence

Changed usage limit messages to call the 5-hour window the "5-hour limit" instead of the "session limit"