What changed
Claude Code 2.1.147 shipped on May 21, 2026. The headline addition is the Workflow tool for deterministic multi-agent orchestration — off by default and enabled with CLAUDE_CODE_WORKFLOWS=1. Pinned background sessions get sharper lifecycle handling: they stay alive when idle, are restarted in place to apply updates, and are shed only after non-pinned sessions when memory is tight. /simplify is renamed to /code-review with new behavior (correctness bugs at a chosen effort level, optional --comment to post inline PR comments) and the old cleanup-and-fix flow is gone. The security fix in this release closes a managed-settings bypass where forceLoginOrgUUID and forceLoginMethod weren’t enforced against third-party-provider or API-key sessions. The rest is REPL/Workflow sandbox hardening, auto-updater diagnostics, large-file diff rendering performance, prompt-history dedup, and a wide bug-fix sweep across PowerShell, Windows, MCP pagination, plugins, and terminal UI.
New features
-
Workflowtool — deterministic multi-agent orchestrationStitching several agents together in a fixed order previously required external tooling or hand-rolled scripts. This release introduces a
Workflowtool that handles deterministic orchestration directly. It’s off by default; setCLAUDE_CODE_WORKFLOWS=1to enable it.
Improvements
-
Pinned background session lifecycle in
claude agentsPinned sessions could be cleaned up while idle or come back somewhere unexpected after an update was applied, which broke the working context. Pinned sessions now stay alive when idle, are restarted in place to apply Claude Code updates (pin with
Ctrl+T), and are shed under memory pressure only after non-pinned sessions. -
/simplifyrenamed to/code-review, with effort-level correctness review and--commentfor inline GitHub PR commentsThe old
/simplifycleaned up and modified code, which didn’t match the workflow when you actually want to find correctness bugs. The command is now/code-reviewand reports correctness bugs at a chosen effort level (e.g./code-review high), with--commentto 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
Both sandboxes had escape paths via prototype pollution and thenable patterns. This release closes both.
-
Auto-updater retries, error categories, OS error codes, and current-version reporting on failure
Failed auto-updates were hard to diagnose. The updater now retries transient network failures and, on failure, reports specific error categories, OS error codes, and the currently installed version.
-
Diff rendering performance for large file edits
Diff rendering noticeably slowed down on large edits. The rendering path is optimized so large edits stay responsive.
-
Prompt history no longer records consecutive duplicate entries
Re-submitting the same prompt by recalling it with arrow-up used to append another copy to history, so scrolling back saw the same line repeated. Consecutive duplicates are now stored once.
Bug fixes
Security & enterprise auth
forceLoginOrgUUIDandforceLoginMethodmanaged-settings not being enforced against third-party-provider and API-key sessions — enforcement now covers those session types.
Headless & SDK
- Unknown slash commands silently doing nothing in headless/SDK mode — they now show an error message.
- Uncaught exception at the end of streaming sessions when running via the Agent SDK — fixed.
Plugins & skills
- Plugin agents declaring multiple
Agent(...)types intools:frontmatter dropping all but the last entry — all entries are preserved. - Plugin component counts in
claude plugin detailsand/pluginbeing doubled when a plugin’s manifest listed paths overlapping its default directories — counts are accurate. - Slash commands followed by a tab or newline being treated as an unknown command — now parsed correctly.
Terminal & UI
&in!command output displaying as&, which broke copy-pasting URLs from commands likegcloud auth loginon headless machines — the raw&is preserved./helprendering a broken tab header and showing only one command per page on small terminals when not in fullscreen mode — fixed./effortopening with the slider on the wrong level — it now starts at your current effort./theme“New custom theme” and color editor dialogs not responding to Esc — fixed.- GNOME Terminal right-click and middle-click paste not inserting text — fixed.
- Several spacing and layout glitches in the
/plugin,/status,/mobile,/sandbox, and/permissionsmenus — fixed. - Pasted text being delivered to agents as an unreadable
[Pasted text #N]placeholder instead of the actual content — the real content is now passed through. - Stripped images prompting the model to repeatedly re-read media that was no longer present — fixed.
Shell snapshot
- Shell snapshot dropping user functions whose names start with a single underscore, breaking aliases that referenced them — those functions are now retained.
PowerShell & Windows
- Hook
ifconditions likePowerShell(git push*)never matching — onlyPowerShell(*)worked — patterns now match as written. - PowerShell tool dropping output for commands that rely on the default formatter — output is preserved.
- 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
pwshis installed via winget or the Microsoft Store — fixed. - On Windows, removing a background-job worktree no longer follows NTFS junctions into the main repo — fixed.
- Rare hang when waiting for scroll to settle on Windows — fixed.
- Full-screen strobing in attached background sessions on Windows Terminal while Claude is streaming — fixed.
- Stale and doubled rows in the agent view list on Windows when background session results contain wide (CJK) characters — fixed.
MCP
- Paginating MCP servers dropping resources, templates, and prompts past page 1 — all pages are now retrieved. (Note: 2.1.144 fixed the same pagination drop for
tools/list; this release completes the picture for resources, templates, and prompts.)
Background sessions & agents
/backgroundrefusing sessions whose only typed input was a skill or custom slash command — now accepted.- Auto mode suppressing
AskUserQuestionwhen the user or a skill explicitly relies on it — the auto-mode classifier now sees the user’s answers as intent signal. - Backgrounded sessions re-prompting for tool permissions you already granted with “don’t ask again” — permissions are preserved.
CLAUDE_CODE_SUBAGENT_MODELnot applying to teammate processes spawned by agent teams — now applied to teammate processes as well.
Notes
Workflowtool is opt-in: deterministic multi-agent orchestration is gated behindCLAUDE_CODE_WORKFLOWS=1. The sandbox hardening (prototype-pollution and thenable-based escapes) applies once it’s enabled./simplify→/code-reviewis a behavior change: the rename is not cosmetic. The old/simplifycleanup-and-fix flow has been removed in favor of correctness review at effort levels. Scripts that relied on/simplifyneed to be re-evaluated against the new behavior.- Managed-settings enforcement closed for third-party-provider and API-key sessions:
forceLoginOrgUUIDandforceLoginMethodwere previously not enforced for those session types. If admin policies appeared to be bypassed in earlier versions, enforcement tightens with this release. - Second MCP pagination fix: 2.1.144 closed the pagination drop for
tools/list, and this release closes it forresources,templates, andprompts. If a paginated MCP server seemed to surface fewer items than expected, re-check after upgrading. - Auto-updater diagnostics: failure reports now include error category, OS error code, and current installed version — useful when filing IT support tickets or release issues.
- PowerShell hook matching:
ifconditions with argument patterns likePowerShell(git push*)never matched before, onlyPowerShell(*)did. Existing policy files may have been broader in practice than intended; verify intended narrowing after upgrading.