Claude Code 2.1.229
新功能 8 項
遠端工作階段斷線不再假裝還在忙
你離開電腦後用 Remote Control 遠端控制,回來想接著做,現在可用 claude remote-control --continue 接回最近一次工作階段。ListAgents 也會把斷線的工作階段標成 offline,雲端的標成 cloud;筆電終端機輸入斜線指令後,遠端畫面不會再一直轉圈。像車站看板終於分清楚列車是在月台、已離站,還是根本不在線上,不必盯著假進度猜它在做什麼。
官方原文
Documented claude remote-control --continue for resuming the most recent Remote Control session
ListAgents now marks disconnected Remote Control sessions as offline and labels your cloud sessions as cloud
Fixed Remote Control clients showing a stuck working spinner after a slash command typed in the laptop terminal
自架執行器開工時少踩三種地雷
公司自己架的 runner(執行器,替遠端工作接手跑任務的機器)現在比較能順利開工。伺服器可提供 hook(掛鉤,特定事件發生時被觸發的小程式),行為會跟受管理環境一致;若 managed-mcp.json 和伺服器送來的 MCP 伺服器撞在一起,會略過後者並警告,不會一啟動就退出。缺少 Git 憑證時也不再卡在 Credential Manager 問答;Windows 則必須明寫 --base-dir。像施工隊先拿到工地地址、碰到重複工單會標記,沒門禁卡就立刻回報。
官方原文
Added server-supplied Claude Code hook support for self-hosted runner sessions, matching managed-environment behavior
Fixed self-hosted runner and other remote sessions exiting at startup when managed-mcp.json is deployed and the server delivers MCP servers; those servers are now skipped with a warning
Fixed self-hosted runner repository preparation hanging on a Git Credential Manager prompt; git now fails fast when credentials are missing
Changed self-hosted runner Windows startup to require an explicit --base-dir; there is no default checkout directory on Windows
長回覆不中斷,也不會重複說兩遍
Claude 想很久才回話時,Vertex 和 Bedrock 的連線不會被上游當成閒置而切斷了。gateway 串流回應會在思考停頓間送出 SSE keepalive ping(保活訊號,告訴對方連線仍活著的短訊息);同時,長回覆串流時只顯示一次,也不會有一部分憑空消失。像電話兩端沉默思考時偶爾聽到一聲「我還在」,線路就不會被掛掉,說完的話也不會忽然重播或少半句。
官方原文
Added SSE keepalive pings to gateway streaming responses during long thinking pauses, preventing idle-timeout disconnects on Vertex and Bedrock upstreams
Fixed long responses partly disappearing while streaming and being printed twice in the terminal
外掛來源能跟著本機工具更新
若你的 IDE 要告訴 Claude 外掛放在哪裡,市集現在可把 command 設成來源:本機指令印出外掛目錄後,每次工作階段都重新找一次,不必重啟;mode: "link" 則直接以那個目錄取代原本內容。單獨跑一次 claude plugin 指令後留下的 liveness 檔也會清掉,不再妨礙舊外掛版本清理。像租借櫃的取件地址每次都重新查,搬家後不用重辦會員;用完的號碼牌也不會留在櫃台,堵住後續整理。
官方原文
Added plugin marketplace command sources: a local command (e.g. an IDE) prints the plugin directory, which is re-resolved each session and applied without a restart; mode: "link" uses it in place
Fixed one-shot claude plugin commands leaving a stray liveness file that could prevent cleanup of outdated plugin versions
VS Code 裡的側邊工作更好看也更好整理
IDE 接著 Claude 時,即使檔案有上千筆診斷訊息,剛編輯完也不會卡住好幾秒。VS Code 裡「Report a problem」和 /bug 會開內建回報對話框,不再指向已退休的問卷;/btw 追問面板可拖曳調整大小。側欄還能建立、改名、刪除工作階段群組,用 Cmd/Ctrl 或 Shift 點選一次搬多個工作階段。像書桌抽屜能分資料夾,隔板可移動,報修單也終於送到仍有人收件的窗口。
官方原文
Fixed multi-second UI stalls after editing a file with thousands of IDE diagnostics while the IDE extension is connected
[VSCode] "Report a problem" and /bug now open the built-in feedback dialog instead of a retired survey link
[VSCode] Made the /btw side-question panel resizable by dragging its boundary, in both side-docked and stacked layouts
[VSCode] Added session groups in the sidebar — right-click to create, rename, or delete; Cmd/Ctrl- or Shift-click to move several sessions at once
多人工作流程會避開容器誤判與重複計費
在 CPU 被限制的 container(容器,把程式隔在一個受限小空間的環境)裡跑動態 workflow,現在會依容器分到的 CPU 數量,而不是誤用主機全部核心數。工作流程分派同一前綴的姊妹 agent(代理,分頭處理任務的執行者)時,也會錯開時間,後來者讀取已快取(cache,把查過結果暫存起來直接用)的提示詞前綴,不重複付費;想關掉可設 CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS=0。像廚房按實際爐口排班,後面的人接著看前一張備料單,不必每人重買一箱食材。
官方原文
Fixed dynamic workflows inside CPU-limited containers using the host machine's core count instead of the container's CPU limit
Improved workflow fan-outs to stagger same-prefix sibling agents so subsequent agents read the cached prompt prefix instead of re-paying it (CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS=0 disables)
空白輸入與裝不下的對話,會給你原因
用 SDK 或 --input-format stream-json 送出只含空白的訊息,以前可能收到 400 API 錯誤,現在不再如此。若對話訊息本身已超過 API 的 32 MB 請求上限,且沒有圖片或文件可移除,Claude 不會徒勞重試 compaction(壓縮,把舊對話濃縮以騰出空間),而是一次失敗並說清楚;「提示詞太長」也會解釋為何自動壓縮救不回。像行李箱已塞滿衣物,沒有可拿掉的外套時,櫃檯直接告訴你超重原因,不會反覆硬關拉鍊。
官方原文
Fixed SDK and --input-format stream-json sessions getting a 400 API error when a whitespace-only message was submitted
Fixed conversations whose messages alone exceed the API's 32 MB request limit retrying compaction when no images or documents can be stripped; they now fail once with a clear message
Improved "prompt is too long" errors to explain why automatic compaction could not recover instead of only suggesting /compact
安全檢查更嚴,危險操作也不會被默許
設定 sandbox(沙箱,把程式關在受限範圍內執行的隔離環境)網路網域時,IPv6 位址會正確加方括號,例如 [::1]:443;寫法有歧義會採拒絕連線的安全方向,/doctor 也會指出來。/login 成功後仍會再次提醒 CLAUDE_CODE_OAUTH_TOKEN 覆寫警告。更重要的是,/commit-push-pr 遇到 --force、--amend、--no-verify 等危險旗標不再自動批准。像門禁遇到看不清的地址先不放行,並提醒你手上舊門卡可能覆蓋新卡,搬動重物前還會要求你親自確認。
官方原文
Improved sandbox: IPv6 literals in network domain lists are now bracketed ([::1]:443), and ambiguous spellings are enforced fail-closed and flagged by /doctor
Updated /login to repeat the CLAUDE_CODE_OAUTH_TOKEN override warning after a successful login
Changed /commit-push-pr so git/gh commands with dangerous flags (--force, --amend, --no-verify, etc.) are no longer auto-approved
修正 3 項
狹窄視窗、怪路徑與壞參數不再把程式撞倒
把終端機縮得很窄時,進度列或 Markdown 表格不會再觸發 RangeError,連 claude --continue、--resume 開機也不會跟著倒下。工具呼叫把本該是文字的 glob、file_path、command 塞成其他型別,程式會避開錯誤畫面;受影響工作階段重新 --resume 也一樣。Windows 的 \\?\ 長路徑與 UNC 網路路徑能處理,原子替換檔案後漏掉的 watcher 控制代號會釋放;排程 watcher 在網路或虛擬檔案系統失敗時不會丟出未接住的錯誤。像窄巷、特殊地址和壞掉的路標都不會讓送貨車翻覆。
官方原文
Fixed a crash to the error screen (including on --resume of the affected session) when a tool call had a non-string glob, file_path, or command value
Fixed a RangeError crash when a progress bar or markdown table rendered in a very narrow terminal window (could also crash claude --continue/--resume at startup)
Fixed a crash on Windows when a tool call or message referenced a file by an extended-length (\\?\) or UNC path
Fixed a file-watcher handle leak after atomic file replacements, and an uncaught error on Windows when the scheduled-tasks watcher failed on a network or virtual filesystem
經過閘道連線時,登入與模型選擇更對得上
你若經由自訂 ANTHROPIC_BASE_URL 閘道連線,claude.ai 訂閱者現在能在 /model 選 Sonnet 或 Opus 1M,不會被錯擋;關掉 attribution header(署名標頭,請求附帶來源標示)後,自動模式每次工具呼叫失敗的問題也修了。嚴格的 MCP OAuth 授權伺服器會收到 127.0.0.1 而非 localhost 的重新導向網址;Claude Desktop 的 OpenTelemetry(遙測,把使用狀況送到觀測端)若也送往 Desktop 管理的閘道,現在可被接受。像同一棟大樓的訪客證、電梯與收件室終於使用同一套地址格式。
官方原文
Fixed auto mode failing on every tool call for users who disable the attribution header via CLAUDE_CODE_ATTRIBUTION_HEADER (direct Anthropic API connections)
Fixed /model rejecting Sonnet/Opus 1M for claude.ai subscribers using a custom ANTHROPIC_BASE_URL gateway
Fixed MCP OAuth with strict authorization servers by using 127.0.0.1 instead of localhost in the redirect URI
Fixed OpenTelemetry export from Claude Desktop sessions being rejected by the Desktop-managed gateway when that gateway is also the telemetry endpoint
GitHub App 裝好的程式碼審查會真的貼出來
你用 /install-github-app 裝好 Claude Code Review,等它跑完卻在 Pull Request(合併程式前請人檢查的提案頁)找不到評論,這個落空已修正。工作流程完成時會把審查貼到該 Pull Request,而不是只在背景宣告自己做完。像你請人改一份文件,對方不再把批註鎖在抽屜裡,會把它貼回你正在看的那一頁。
官方原文
Fixed the Claude Code Review workflow generated by /install-github-app completing without posting its review on the pull request