用 Claude Code 编程的赶紧更新,这次改了安全策略,git 破坏命令被自动挡,防止手滑。还修了一大堆 bug,体验更稳。
Claude Code v2.1.183 在安全方面改进了自动模式,现在会阻止未授权的 git reset --hard、git checkout -- .、git clean -fd、git stash drop 等破坏性命令,以及非本会话 agent 创建的 git commit --amend。此外,terraform destroy、pulumi destroy、cdk destroy 也会被阻止,除非你明确指定 stack。此版本还新增了 /config --help 命令、attribution.sessionUrl 设置,并修复了多个 bug,包括终端 TUI 在 Windows Terminal 下崩溃、子 agent 中 WebSearch 返回空结果,以及模型仅返回思考块时静默完成的问题。
v2.1.183
What's changed 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 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 Added attribution.sessionUrl setting to omit the claude.ai session link from commits and PRs in web and Remote Control sessions Added /config --help to list all available shorthand keys for /config key=value Changed /config toggle behavior: Enter and Space both change the selected setting, and Esc now saves and closes instead of reverting Removed the startup "setup issues" line under the logo — run /doctor to see configuration issues or use --debug Fixed thinking.disabled.display: Extra inputs are not permitted 400 errors on subagent spawns and session-title generation for affected configurations Fixed WebSearch returning empty results in subagents Fixed the terminal cursor being stranded above the prompt after navigating history in vim mode with the native cursor enabled Fixed fullscreen TUI corruption (statusline mid-screen, duplicated spinner rows, merged text) in Windows Terminal under heavy nested-subagent load Fixed turns silently completing with no visible output when the model returned only a thinking block; Claude now re-prompts once 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 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 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 Fixed focus mode showing "Ran N PostToolUse hooks" timing lines under each response