Claude Code 2.1.183
新功能 1 項
自動模式加裝防護網,攔截破壞性刪除指令
Claude 現在不會在你未明講放棄工作內容時執行破壞性的 Git 指令。如果你沒有明確叫它放棄目前的工作進度,系統會主動攔截那些危險的 Git 指令(像是 git reset --hard、git clean -fd 等會刪掉檔案的操作);對於 git commit --amend,如果不是它自己這次對話做的提交,它也不准修改。如果你用的是 Terraform 或 Pulumi 等基礎設施工具,除非你點名要刪除特定環境,否則系統會嚴格禁止執行 destroy 把伺服器砍掉。此外,以前排程任務或 Webhook 收到的訊號會被系統誤當成你的鍵盤輸入,甚至不小心幫 AI 按下「同意」按鈕,現在這個安全漏洞也被補上了。這就像給除草機加裝了安全鎖,除非你明確解鎖並指著那片花圃,否則它絕對不會把珍貴的玫瑰花當成雜草一起絞掉;而且外頭飛進來的鳥也不會再誤觸開關啟動機器了。
官方原文
Improved auto mode safety: destructive git commands (git reset --hard, git checkout -- ., git clean -fd, git stash drop) are now blocked when you didn't ask to discard local work, git commit --amend is blocked when the commit wasn't made by the agent this session, and terraform destroy/pulumi destroy/cdk destroy are blocked unless you asked for the specific stack
Fixed scheduled task and webhook trigger deliveries being treated as keyboard input; they now classify as task notifications and can no longer approve a pending action or set the session title in auto mode
修正 2 項
代理人團隊更強韌,網路搜尋與輸出不再罷工
讓 AI 分工合作的代理人團隊現在更可靠了。以前如果你用 tmux(一種終端機分割工具)開出新隊友,遇到電腦載入太慢就會啟動失敗,甚至你在主畫面打的字會莫名其妙跑到新隊友的視窗去,現在這些互相干擾的問題都解決了。而且,以前隊友交代給子代理人去跑的背景任務,只要隊友一結束回合就會被無情砍掉,現在任務會順利跑完。針對 AI 的搜尋與思考,以前子代理人去查網頁(WebSearch)老是查出空白結果,或是 AI 花了一大堆時間思考(thinking block)卻沒吐出任何實質對話就結束回合,現在會再提示一次模型產生可見輸出。最後,因為設定衝突導致生出子代理人時狂跳 400 Extra inputs are not permitted 錯誤的毛病也修好了。這就像是工廠裡的生產線,以前新來的機器人開機太慢會讓產線停擺,交代給實習生的工作也會因為主管下班就被強制丟進垃圾桶;現在大家交接順暢,就算主管下班,實習生也會把手上的工作乖乖做完。
官方原文
Fixed tmux teammate panes failing to launch when the shell has slow rc-file initialization, and keystrokes typed during agent spawn leaking into the new tmux pane instead of the leader prompt
Fixed background tasks started by a teammate being killed when the teammate finishes a turn
Fixed WebSearch returning empty results in subagents
Fixed turns silently completing with no visible output when the model returned only a thinking block; Claude now re-prompts once
Fixed thinking.disabled.display: Extra inputs are not permitted 400 errors on subagent spawns and session-title generation for affected configurations
設定與介面大掃除,畫面更乾淨無 Bug
這次的介面變得更清爽順手了。設定面板(/config)現在操作更直覺,你可以按 Enter 或空白鍵直接切換開關,按 Esc 也會乖乖存檔關閉,而不是像以前一樣取消還原;想知道有什麼快捷指令,也可以直接打 /config --help 查詢。畫面上,我們移除了每次開機都會顯示的「設定問題」警告,現在想檢查問題請直接用 /doctor 指令。選到已淘汰或會自動升級的模型時,現在會看到警告。針對各種當機與干擾也做了大掃除:修好了在 Windows 終端機跑大量代理人時整個畫面崩潰混亂的問題、解決了在 vim 模式下游標會卡在輸入框上面的靈異事件、拔掉了專注模式下每句話底下吵死人的 Hooks 執行計時文字,也確保你自己寫的技能不會在清單上像影分身一樣出現好幾次。最後,如果你在無頭環境(headless,沒有螢幕)需要認證 MCP 伺服器,現在也不會再因為系統亂拿假工具給 AI 用而當機了。這就像把雜亂的工作桌重新整理,不該響的警報器拔掉、壞掉的按鈕修好,連會讓螢幕閃爍的舊燈管也一併換新,讓你專心工作不被打擾。
官方原文
Changed /config toggle behavior: Enter and Space both change the selected setting, and Esc now saves and closes instead of reverting
Added /config --help to list all available shorthand keys for /config key=value
Added attribution.sessionUrl setting to omit the claude.ai session link from commits and PRs in web and Remote Control sessions
Removed the startup "setup issues" line under the logo — run /doctor to see configuration issues or use --debug
Added a warning when the requested model is deprecated or automatically updated to a newer model, shown on stderr in print mode (-p) and now also covering models set in agent frontmatter
Fixed fullscreen TUI corruption (statusline mid-screen, duplicated spinner rows, merged text) in Windows Terminal under heavy nested-subagent load
Fixed the terminal cursor being stranded above the prompt after navigating history in vim mode with the native cursor enabled
Fixed user-level skills appearing multiple times in slash-command autocomplete when multiple plugins are enabled
Fixed MCP servers requiring authentication exposing auth-stub tools to the model in headless/SDK mode
Fixed focus mode showing "Ran N PostToolUse hooks" timing lines under each response