usage

Claude Code 2.1.234

工具與目錄
在這頁

新功能 15 項

01

替每個專案的對話紀錄取短名

⟦像檔案館替各專案卷宗編短檔號,櫃位仍在原處,翻找時不用讀完整串名稱。⟧同一台主機替每個工作階段各放一個設定資料夾時,對話紀錄的專案資料夾名稱不必再拖得很長。新增的環境變數(environment variable,程式啟動時讀取的外部設定)CLAUDE_CODE_PROJECT_DIR_NAME 可替每個專案的 transcript 資料夾指定短名。在啟動 Claude Code 的主機環境設定 CLAUDE_CODE_PROJECT_DIR_NAME=project-a,讓專案 transcript 資料夾使用 project-a。原本分開存放的設定方式不變,只是資料夾名稱更好辨認。

官方原文

Added the optional CLAUDE_CODE_PROJECT_DIR_NAME environment variable: hosts that give each session its own config directory can choose a short name for the per-project transcript directory

02

選取文字可用按鍵清掉,Esc 不再誤清

⟦這像桌上多了一把只用來擦掉螢光筆記號的橡皮擦,而離開按鈕不會順手把整段標記抹掉。⟧在程式裡反白一段文字後,現在可把按鍵綁定到 selection:clear,專門取消這個文字選取;agents view 也能用。全螢幕模式用滑鼠反白時,Esc 則不會再把選取範圍清掉,它照常只負責中斷或關閉。你可以在按鍵設定中把 selection:clear 指給想用的按鍵。

官方原文

Added the selection:clear keybinding action, so a key can be bound to clear an in-app text selection; also works in the agents view

Changed Esc in fullscreen mode to no longer clear a mouse text selection: it interrupts or dismisses as usual and the selection stays highlighted

03

GitLab 合併請求狀態直接顯示

⟦像球場計分板隨時亮出比賽狀態,不必離場另外查詢。⟧專案連到 GitLab,而且 glab CLI 已完成登入時,頁尾與狀態列(statusline,終端機最底下的即時資訊)會顯示合併請求的 MR !N。草稿、等待中與綠色狀態也會一起顯示,不必先離開目前工作去查網頁。這只適用於有 GitLab remote 的 repository,並需要已驗證的 glab。

官方原文

Added a GitLab merge request badge to the footer and statusline: repos with a GitLab remote and an authenticated glab CLI show MR !N with draft/pending/green states

04

用量額度重設後可自動接著工作

⟦像暫停的播放器在可播放時接著播;不想它自動播放,就把那個選項關掉。⟧工作做到 claude.ai 用量限制剛好卡住時,額度重設後,Claude Code 現在會自動延續原本的工作階段。若你不想自動繼續,可開 /config,關掉「Continue automatically at usage limit」。選擇權留在你手上:保留設定就等待額度重設後接續,關閉後則由你決定何時再開始。

官方原文

Claude Code now continues your session automatically when a claude.ai usage limit resets; turn it off in /config ("Continue automatically at usage limit")

05

帳號信箱只用來辨識你

⟦像櫃檯核對證件後把證件還給你,不會拿著它去別的店家登記。⟧帳號 email 現在被明確限制為辨識你本人之用。除非你提出要求,Claude 不會把它送往無關的服務。這講的是帳號信箱的使用界線,不是要你另外開啟某個設定;當對話需要知道你是誰時可使用,和外部不相干服務之間則不自行傳遞,也不會因為系統自行選擇而交給外部;這正是它的限制。

官方原文

Claude is now told to use your account email only to identify you, and not to send it to unrelated services unless you ask

06

Windows 特殊路徑在核准前先擋下

⟦像行李分揀系統先剔除標籤格式異常的行李,不讓它進入後續運送流程。⟧遠端讀檔、還原工作階段、載入 CLAUDE.md、workflow script 與上傳檔案,現在都拒絕 Windows NT-namespace 的 \??\ 路徑。這些原本仍在核准前可進行的檔案存取點,因此特別補上防線,用來降低 NTLM credential leak 的風險。它不是一般檔案路徑都不能讀,而是針對這種特殊命名空間格式。

官方原文

Security: remote file reads, session restore, CLAUDE.md includes, workflow scripts and file uploads now reject Windows NT-namespace (\??\) paths, hardening the remaining pre-approval file accesses against the NTLM credential-leak vector

07

異常 API 回應不再直接當機,錯誤更好查

⟦像實驗儀器標出缺少的讀值,卻不讓整場測試停擺,還會留下可追查的紀錄。⟧經由第三方 gateway 的非串流備援回應,若 thinking block 少了 thinking 欄位,或 text block 少了 text 欄位,Claude Code 不再因此當機。碰上「API returned an empty or malformed response」時,錯誤訊息也會交代收到的 content type、body kind、size、request ID,以及原本 streaming request 為何失敗。

官方原文

Fixed a crash when an API response on the non-streaming fallback path (typically via third-party gateways) contained a thinking block missing its thinking field or a text block missing its text field

Improved the "API returned an empty or malformed response" error to say what came back (content type, body kind, size, request ID) and why the original streaming request failed

08

Markdown 顯示更快,也更像對話內容

⟦像排版員把一頁講義的分隔線、特殊字元和手寫筆記一併排正,讀起來不再卡住或擠成一團。⟧少見 Unicode 字元序列的訊息不會再讓 markdown rendering 慢到難以使用,--- horizontal rule 也不再黏到下一行。你自己輸入的 prompt 現在同樣會用 markdown 顯示,包含 highlighted code block、inline code 與 list,和回覆的呈現方式一致。這些改動都在整理對話文字如何被畫出來。

官方原文

Fixed markdown rendering becoming extremely slow for some messages containing unusual Unicode sequences

Fixed a --- horizontal rule in rendered markdown running into the line after it

Improved the transcript: your own prompts now render markdown (highlighted code blocks, inline code, lists) the same way replies do

09

自動產生的工作階段名稱更像標籤

自動產生的 session title 現在偏向短而具體的名稱,例如「Login button bug」,不再只是把你的請求整句重述成「Fix the login button on mobile」。名稱仍是自動生成,但用途從重複一遍對話內容,改為替之後回看時提供更快辨識的標籤。⟦像電影院場次表只寫片名,不重播整段預告;短名讓你一眼認出要找的那場。⟧

官方原文

Improved auto-generated session titles to read as short, specific names (e.g. "Login button bug") rather than sentences restating your request (e.g. "Fix the login button on mobile")

10

內建 claude-api 技能載入少花上下文

載入內建 claude-api skill 時,context cost 已從約 200k+ tokens 降到約 25k tokens。做法是 reference doc 改成按需要才載入,而不是一開始全塞進 context。token(AI 處理與計費的文字單位)這裡指模型讀取文字所用的量;技能仍可用,只是先帶進對話的參考資料變少。⟦像出門先帶常用工具箱,等真的需要某份說明書才去抽取,而非把整個倉庫都搬上車。⟧

官方原文

Reduced the context cost of loading the built-in claude-api skill from ~200k+ tokens to ~25k by loading reference docs on demand

11

工具畫面少掉重複標籤,重點更容易看

auto mode 原本每個 Agent tool call 下方都重複顯示「Allowed by auto mode classifier」,這行現在移除了。正在執行的 tool header 裡,elapsed-time counter 也調暗,不再和粗體 count 搶視線。兩者都不是功能權限改變,而是把已經呈現的工具活動資訊整理得更不擁擠。⟦像儀表板拿掉每格都重複的核准貼紙,並把次要的時間字淡化,眼睛自然先看到真正需要注意的數字。⟧

官方原文

Removed the redundant "Allowed by auto mode classifier" line that auto mode showed under every Agent tool call

Dimmed the elapsed-time counter on the running tool header so it no longer competes with the bold counts

12

代理團隊沿用領隊模型

/config 裡的「Default teammate model」設定已移除。agent-team 的 teammate 現在會沿用 leader 的 model,只有在 spawn 時明確指定才會用另一個。這是既有選擇規則的調整,不是新增另一個預設模型。⟦像同一組樂團照指揮選定的曲譜演奏,只有開演前特別指派的樂手才拿不同版本。⟧

官方原文

Removed the "Default teammate model" setting from /config; agent-team teammates now use the leader's model unless the spawn names one

13

背景通知沿用同一種標記格式

背景工作在兩個 turn 之間送來 notification 時,model 現在會在 <system-reminder> tags 內收到,與 turn 中途送達的格式一致。這項調整統一通知的外框,讓不同時點送達的內容採用同一種標記。背景工作仍是在兩個 turn 之間送達;改的是 model 收到它時所看見的外層格式。⟦像舞台監督無論在演出中或換場時遞提示卡,都放進同樣的提示套。⟧

官方原文

Background task notifications delivered between turns are now sent to the model inside <system-reminder> tags, matching mid-turn delivery

14

Mantle 啟動少做一次不必做的探查

Mantle 啟動時,如果 main-loop model 已經選好,現在會略過 admin-pin availability probe。原本那個 probe 是在確認 admin-pin 是否可用;既然主迴圈模型已有選擇,這個條件下就不再進行該項啟動檢查。此項是縮減啟動流程裡不需要的探查,沒有新增一個管理 PIN 設定。⟦像出門前既然已拿到指定鑰匙,就不用再回頭逐一檢查另一串備用鑰匙。⟧

官方原文

Mantle: skip the admin-pin availability probe at startup when a main-loop model is already picked

15

唯讀設定檔不再讓 Windows 啟動卡住

Windows 上的 ~/.claude.json 若是 read-only,Claude Code 啟動時不會再卡在 repeated rename retry。問題出在反覆嘗試重新命名這個設定檔;現在遇到唯讀狀態時,啟動流程不會因此停滯。這不表示程式會改寫唯讀檔,而是避免無法改名時一直卡在重試。⟦像門鎖住的檔案櫃不能搬動時,工作人員不再一直拉著把手不放,而會讓其他開門準備繼續走。⟧

官方原文

Windows: startup no longer stalls on repeated rename retries when ~/.claude.json is read-only

修正 16 項

16

長對話裡的權限回答不再失憶

⟦像長途接力時把已蓋章的通行單一路傳下去,不會跑到中途又要求同一張單重新審核。⟧很長的對話被 compact 之後,auto mode 不會再反覆重查並拒絕 sandboxed command 的網路存取。背景 subagent 跳出工具權限詢問時,這個工作階段的允許或拒絕回答也不會再遺失。前者處理對話壓縮後的網路權限,後者保住你對背景代理的選擇。

官方原文

Fixed auto mode in very long sessions repeatedly re-checking and denying sandboxed commands' network access after the conversation had been compacted

Fixed session-scoped permission answers (including denies) being dropped when answering background subagent tool permission prompts

17

代理訊息與清單不再把長名稱看錯

從 ListAgents 複製 recipient 後,即使 session name 剛好到 200-character cap,或塞了很多 emoji,SendMessage 也不會再拒收。帳號的 session list 太長而無法完整檢查時,SendMessage 和 ListAgents 現在會明說,不能再把沒看見的工作階段當成不存在。⟦像圖書館員查閱很長的索引,既能依完整條目找書,也會標出尚未核對的卷冊。⟧

官方原文

Fixed SendMessage rejecting a recipient copied from ListAgents when the session name is at the 200-character cap or emoji-heavy

SendMessage and ListAgents now say when your account's session list was too long to check completely, instead of treating unseen sessions as absent

18

Git remote 會辨識正確主機

git remote 的網址帶有特殊 userinfo 時,repository detection 過去可能讀錯 host,讓連結指向錯誤主機,也讓依 repository 而定的行為套用到不對的地方。現在它會抓到正確的 host,連結與依 repository 區分的行為也回到該去的位置。⟦像導航讀到地址中的特殊註記時,仍能辨認目的地,不會把註記當成城市。⟧

官方原文

Fixed repository detection mis-reading the host of git remotes with unusual userinfo, producing links and repo-specific behavior for the wrong host

19

MCP 診斷不再露出機密

檢查 MCP(Model Context Protocol,讓 AI 連接外部工具的協定)diagnostic 時,畫面不再印出已解析的 secret。scope conflict warning 會保留設定中的 ${VAR} 形式;connection failure detail 則只顯示 server origin。⟦像檢驗報告保留欄位名稱與檢體來源,卻不把檢體內容攤在走廊給人看。⟧

官方原文

Fixed MCP diagnostics printing resolved secrets: scope-conflict warnings now show the configured ${VAR} form, and connection-failure details show only the server origin

20

市集來源白名單會核對真正連線主機

strictKnownMarketplaces 的 allowlist 現在不會接受一個看似允許、但 Git 實際連線主機不同的 SCP-style git marketplace source。這是修正來源檢查與真正連線位置不一致的問題;設定了嚴格白名單時,檢查對象會對準 Git 真正要連去的 host。⟦像航空管制核對飛機實際使用的呼號是否在許可名單上,而不只看飛行計畫表的名稱。⟧

官方原文

Fixed strictKnownMarketplaces allowlists accepting SCP-style git marketplace sources whose host differs from the one git would actually connect to

21

登入連結與登入提醒各自送到對的人

全螢幕複製 /login 的 OAuth URL 等 modal 文字時,不會再遺失字元。當 Anthropic profile credential 已過期,且 claude.ai login 會優先處理時,畫面會指向 /login。若 /login 後仍設定 CLAUDE_CODE_OAUTH_TOKEN,舊 token 的提醒只會給你看,不會漏進 Claude 自動延續的 turn。⟦像自助入口螢幕給你完整通行碼,把過期憑證帶到正確的登入入口,提醒只留在你的螢幕上。⟧

官方原文

Fixed modal text such as the /login OAuth URL losing characters when copied in fullscreen

Fixed: after /login while CLAUDE_CODE_OAUTH_TOKEN is set, the stale-token reminder no longer leaks into Claude's automatically resumed turn — it now appears only to you

Expired Anthropic profile credential now points you at /login when a claude.ai login would take precedence

22

執行中仍可開設定對話,佇列指令也不走樣

Claude 正在工作時,/permissions 的規則修改會套用到目前 turn 的剩餘部分;/add-dir <path> 也能使用。全螢幕 TUI 中,/add-dir、/autocompact、/theme、/help、/config、/advisor 可在中途開啟。正在跑 ! shell command 時開 /permissions 等 dialog 不會在指令結束後被關掉;佇列中的 ! 指令經上箭頭編輯,也不會被當 plain text 送給 model。⟦像直播導播台在播出中仍能調整設定,排隊片段也不會被當成旁白播出。⟧

官方原文

Fixed dialogs like /permissions opened while a ! shell command was running being dismissed when the command finished

Fixed a queued ! shell command being sent to the model as plain text after pressing up-arrow to edit the queued input

/permissions can now be opened while Claude is working — rule changes apply to the rest of the current turn

/add-dir <path> can now be used while Claude is working; /add-dir, /autocompact, /theme, /help, /config and /advisor dialogs open mid-turn in the fullscreen TUI

23

佇列訊息不再搶進歷史,也不黏住 shell 模式

還在 queued 的訊息不會再提早重現於 prompt history。選取 queued message 時按 Esc,現在不會中斷目前 turn;在中途送出後,! mode 也不會殘留黏住。這三項都在分清楚「尚未送出」和「已送去執行」的界線,避免操作佇列時干擾正在進行的工作。⟦像餐廳叫號單仍掛在等候板時,不會先跑進已完成紀錄,也不會把取消鈴誤當成叫停整間廚房。⟧

官方原文

Fixed queued messages reappearing in the prompt history while still queued, Esc while selecting a queued message no longer interrupts the turn, and ! mode no longer sticks after a mid-turn submit

24

全螢幕重啟不再遺失限制規則

新的 fullscreen renderer 提示被接受後重啟 session 時,permission mode、tool allow/deny rule、model 與 effort flag 不會再遺失。/tui 若發現目前 session 有它無法帶過重啟的 --allowed-tools 或 --disallowed-tools restriction,現在會拒絕切換並說明原因。它不再假裝重啟後還保有其實帶不走的限制。⟦像搬家交接清單,確認受限制物品也能完整帶走才換房;帶不走時,交接人會先說明不能搬。⟧

官方原文

Fixed accepting the "Try the new fullscreen renderer?" prompt restarting the session without its permission mode (e.g. --dangerously-skip-permissions), tool allow/deny rules, model or effort flags

Fixed /tui dropping launch --allowed-tools/--disallowed-tools rules when it restarts; it now declines to switch, with the reason, when the session has restrictions a restart can't carry over

25

權限提問會對準正確範圍與正確回答

某個目錄先被看見、後來才在那裡出現 repository 時,trust prompt 現在會帶出 repository-wide scope warning。IDE 的 diff tab 剛好在 permission re-prompt 期間關閉,也不會把上一題的 input 套給新題目。前者補回你該知道的信任範圍,後者確保每次提問只收自己的回答。⟦像簽核表補上整份合約適用範圍,並在換一張表單時不把上一張的簽名誤蓋過去。⟧

官方原文

Fixed trust prompts omitting the repository-wide scope warning when the directory was first seen before the repository existed there

Fixed a case where an IDE diff tab closing during a permission re-prompt could answer the new prompt with the previous input

26

遠端控制傳檔、切帳號與跨裝置資訊更可靠

Claude Code Desktop 或 VS Code 主持的 Remote Control session 傳給使用者的檔案,現在會 upload,因此在 phone 和 web 開啟時不再只看到 empty card。這台電腦登入不同 claude.ai account 或 organization 時,正在執行的 session 會在幾秒內停止並說明原因,不再拖到 HTTP 404。permission mode 的改變會同步給 phone 和 claude.ai/code,後者也會收到 model;phone 或 claude.ai/code 選的 effort 會套用到 terminal、Desktop、VS Code 主持的 session,並發布給連線 client。⟦像遠端會議室把檔案送到每位與會者手中;換了門禁身分就結束舊會議,螢幕同步顯示規則。⟧

官方原文

Fixed: files sent to the user during Remote Control sessions hosted by Claude Code Desktop or VS Code now upload, so they open on phone and web instead of showing an empty card

Remote Control: signing this computer in to a different claude.ai account or organization now stops the running session within seconds and says why, instead of a misleading HTTP 404 hours later

Remote Control sessions started from Claude Code Desktop or VS Code now keep phones and claude.ai/code updated on the session's permission mode (and claude.ai/code on the model) as they change

Remote Control: effort picks made on a phone or on claude.ai/code now apply to terminal- and Desktop/VS Code-hosted sessions, and the session publishes its effort level to connected clients

27

權限預覽既不外送也不遮住關鍵內容

permission preview 現在只 relay 給通過 inbound trust gate 的 channel server,也尊重 server 明確表示不提供 permission capability 的選擇。relay 時的 credential masking 不會再把 command、path 或 destination 一起遮掉,讓 approver 看不見該核准什麼;過大的 private-key block 則會用完整強度 redaction。provider API token 即使緊接 shell delimiter,也會被 mask。⟦像保全只把申請單交給已驗證的窗口,該遮住的密碼遮住,收件地址與申請內容卻仍讓核准者看清。⟧

官方原文

Fixed: permission previews now relay only to channel servers admitted by the inbound trust gate, and a server's explicit permission-capability opt-out is honored

Fixed: credential masking on relayed permission previews can no longer hide commands, paths, or destinations from the approver; oversized private-key blocks now redact under full-strength redaction

Fixed: provider API tokens that mask on permission previews now mask even when directly followed by shell delimiters

28

Desktop 跨工作階段訊息不再悄悄遺失

Claude Desktop 的 inter-session message 在接收端把 cross-session messaging 讀成 disabled 時,過去會被悄悄丟掉,送出端的 query 便長時間停在「thinking」。現在接收 session 不會再因為這個讀取錯誤而丟訊息。修的是訊息傳遞的錯誤判讀,讓送出端不會因為收件端其實沒收到而一直等待。⟦像電話總機不再把誤判為被攔截的通話直接掛斷,來電者也不用對著沒有回音的線路等候。⟧

官方原文

Fixed Claude Desktop inter-session messages being silently dropped by the recipient session when cross-session messaging read as disabled, which left the sender's query "thinking" for many minutes

29

目標遇到不可復原錯誤會清楚收尾,也會追問背景工作

turn 因 revoked auth、exhausted credit balance 或 context overflow 這類不可復原錯誤結束時,/goal 會自行清掉並通知你,不再保持 armed 狀態。background task 讓 goal 等了 30+ minutes 時,Claude 會去 check in,不再無限等待;若不想要這個動作,可設定 CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0。⟦像待辦清單發現任務已因無法修復的原因中止,就把它標示結束;等候太久的委託則主動問一次進度。⟧

官方原文

/goal now clears itself with a notice when a turn dies on an unrecoverable error (e.g. revoked auth, an exhausted credit balance, or a context overflow) instead of staying armed

/goal: when background tasks keep a goal waiting for 30+ minutes, Claude now checks in on them instead of waiting indefinitely (set CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0 to opt out)

30

setup-token 多打一個參數也會被攔下

執行 claude setup-token 時,預期之外的 extra argument 不會再被靜靜忽略,現在會直接拒絕。這可避免你以為多打的內容被採用,實際卻完全沒有作用;指令接受或拒絕的範圍會明白表現出來。要設定 token 時,請只輸入此命令預期的參數。⟦像門禁掃描器收到多出的一張卡,會當場報錯,不把它假裝算進通行紀錄。⟧

官方原文

claude setup-token now rejects unexpected extra arguments instead of silently ignoring them

31

連續 shell 指令會合在正確的執行紀錄裡

連續執行 shell command 時,如果中間穿插 todo 或 task update,畫面過去可能把同一串操作拆成多個「Ran 1 shell command」列。現在不會因為這些更新插進來,就把連續指令的執行紀錄切碎。todo 與 task 的更新仍會出現,只是不再改變你看到的 shell command 分組。⟦像會議紀錄裡插入待辦提醒後,仍把同一位講者連續說的話收在同一段,不會每插一張便條就另開一段。⟧

官方原文

Fixed consecutive shell commands splitting into multiple "Ran 1 shell command" rows when todo/task updates were interleaved between them