# v2.1.147版本更新

- 来源：Claude Code：GitHub Releases（RSS）
- 作者：ashwin-ant
- 发布时间：2026-05-22 04:39
- AIHOT 分数：73
- AIHOT 标记：精选
- AIHOT 链接：https://aihot.virxact.com/items/cmpg08wzy0b65sljwgzjw8l6d
- 原文链接：https://github.com/anthropics/claude-code/releases/tag/v2.1.147

## 精选理由

Claude Code 这次更新不止修 bug，Workflow 工具让多 agent 编排有了确定性模式，虽然默认关闭但值得尝鲜，做复杂工程的开发者可以关注。

## AI 摘要

本次更新引入了`Workflow`工具，支持确定性多智能体编排（默认关闭）。将`/simplify`命令重命名为`/code-review`，现可报告代码正确性问题并支持生成GitHub PR内联评论。改进了自动更新器（增加重试与错误报告）、大文件diff渲染性能，并优化了提示历史记录以避免重复条目。修复了多个关键问题，包括企业登录限制未生效、Windows下的PowerShell工具与终端闪烁问题、插件系统及shell快照的bug，并增强了沙箱安全性与终端兼容性。

## 正文

What's changed

Added the Workflow tool for deterministic multi-agent orchestration. It is off by default — set CLAUDE_CODE_WORKFLOWS=1 to enable

Pinned background sessions (Ctrl+T in claude agents) now stay alive when idle, are restarted in place to apply Claude Code updates, and are shed under memory pressure only after non-pinned sessions

Renamed /simplify to /code-review. It now reports correctness bugs at a chosen effort level (e.g., /code-review high); pass --comment to post findings as inline GitHub PR comments. The old cleanup-and-fix behavior has been removed

Hardened REPL and Workflow tool sandboxes against prototype-pollution and thenable-based escapes

Improved auto-updater: retries transient network failures, reports specific error categories and OS error codes on failure, and shows the current version when an update fails

Improved diff rendering performance for large file edits

Prompt history no longer records consecutive duplicate entries — recalling a prompt with arrow-up and submitting it again won't add another copy

Fixed enterprise login restrictions (forceLoginOrgUUID and forceLoginMethod managed-settings) not being enforced against third-party-provider and API-key sessions

Fixed & in ! command output displaying as &amp;, which broke copy-pasting URLs from commands like gcloud auth login on headless machines

Fixed unknown slash commands silently doing nothing in headless/SDK mode — they now show an error message

Fixed /help rendering a broken tab header and showing only one command per page on small terminals when not in fullscreen mode

Fixed shell snapshot dropping user functions whose names start with a single underscore, which broke aliases referencing them

Fixed plugin agents that declare multiple Agent(...) types in tools: frontmatter dropping all but the last entry

Fixed hook if conditions like PowerShell(git push*) never matching — only PowerShell(*) worked

Fixed PowerShell tool dropping output for commands that rely on the default formatter

Fixed: on Windows, "Yes, and don't ask again" for a PowerShell script invocation now writes a rule that actually matches on subsequent runs

Fixed PowerShell tool failing on Windows with exit code 1 when pwsh is installed via winget or the Microsoft Store

Fixed /effort opening with the slider on the wrong level — it now starts at your current effort

Fixed paginating MCP servers dropping resources, templates, and prompts past page 1

Fixed full-screen strobing in attached background sessions on Windows Terminal while Claude is streaming

Fixed: on Windows, removing a background-job worktree no longer follows NTFS junctions into the main repo

Fixed /background refusing sessions whose only typed input was a skill or custom slash command

Fixed auto mode suppressing AskUserQuestion when the user or a skill explicitly relies on it; the auto-mode classifier now sees the user's answers as intent signal

Fixed /theme "New custom theme" and color editor dialogs not responding to Esc

Fixed an uncaught exception at the end of streaming sessions when running via the Agent SDK

Fixed a rare hang when waiting for scroll to settle on Windows

Fixed stale and doubled rows in the agent view list on Windows when background session results contain wide (CJK) characters

Fixed pasted text being delivered to agents as an unreadable [Pasted text #N] placeholder instead of the actual content

Fixed plugin component counts in claude plugin details and /plugin being doubled when a plugin's manifest listed paths overlapping its default directories

Fixed backgrounded sessions re-prompting for tool permissions you already granted with "don't ask again"

Fixed GNOME Terminal right-click and middle-click paste not inserting text

Fixed CLAUDE_CODE_SUBAGENT_MODEL not applying to teammate processes spawned by agent teams

Fixed slash commands followed by a tab or newline being treated as an unknown command

Fixed several spacing and layout glitches in the /plugin, /status, /mobile, /sandbox, and /permissions menus

Fixed stripped images prompting the model to repeatedly re-read media that was no longer present
