Back to Blog

Claude Code 2.1.141: the stabilization pass after 2.1.139's feature wave

Alex Kim
14 min read
Claude Code 2.1.141: the stabilization pass after 2.1.139's feature wave

The release cadence felt quiet this week. It wasn't.

2.1.131 shipped on May 6. Today is 2.1.141. Eight days, eight public releases. The reason it felt quiet is that the loud one in the middle was 2.1.139, and most people I talked to skipped its changelog because the version number didn't look special. It was. The new claude agents view, a /goal command, a real args field on hooks, MCP servers that now know which project spawned them. All in one release, none of them in the headline.

Then 2.1.141 today, which is roughly 60 bug fixes with four new things slipped in. The four are worth the post on their own – more on those below.

I'll save you the version-by-version reading. Here's the shape of the week.

TL;DR

  • 2.1.139 was the feature drop you might have missed: the claude agents view (Research Preview), the /goal slash command, a clean args: string[] field on hooks (no more shell-escape gymnastics), continueOnBlock so PostToolUse hooks can reject a call without halting the agent, and CLAUDE_PROJECT_DIR finally getting propagated into MCP stdio servers.
  • 2.1.141 quietly adds four things that matter: terminalSequence in hook JSON output (so hooks can fire desktop notifications without trying to own the terminal), ANTHROPIC_WORKSPACE_ID (the missing piece for workload identity federation), claude agents --cwd <path> (scope the session list to a directory, finally), and a Rewind menu option called "Summarize up to here."
  • The polish is the real story. Background agents now keep their permission mode on reopen instead of silently reverting. "View diff in your IDE" is back on file-edit prompts. The transcript_path your hooks get after a worktree switch isn't stale anymore. /model doesn't mutate the autocompact threshold in your other sessions.

What actually shipped in 2.1.139 (recap)

If you skipped 2.1.139's changelog, this is what you missed. It was the biggest feature drop of the cycle.

The claude agents view (Research Preview) lists your active and recent sessions in one screen, with status. As of 2.1.141 it actually tracks completion, which makes the list usable for parallel work across worktrees instead of a guessing game.

/goal is the missing piece between one-shot prompts and open-ended chat. Set a measurable completion condition, the model treats it as a guardrail and grinds until it's met. Then stops.

Hooks finally have a real args: string[] field. Pass the array, Claude Code spawns the command directly, no shell, no quoting bugs. The continueOnBlock field on PostToolUse hooks is the other piece – your hook can reject a tool call without halting the whole agent. Together those two close a real gap in how PostToolUse was designed.

MCP stdio servers now receive CLAUDE_PROJECT_DIR in their environment. The server can finally scope itself to the project that spawned it. No manual env wiring.

A few smaller adds: /scroll-speed with live preview, claude plugin details <name> (so you can see what a plugin really adds before installing), /mcp Reconnect picking up .mcp.json edits without a restart, and the compaction prompt now asking the model to preserve sensitive instructions instead of summarizing them out of existence.

That's the table 2.1.141 was set on top of.

terminalSequence in hooks: desktop notifications without owning the terminal

One new field in 2.1.141's hook JSON output. Single line in the changelog. The most consequential add of the release.

Added terminalSequence field to hook JSON output for desktop notifications without controlling terminal.

The shape of the problem. Hooks that wanted to update the terminal title or push a desktop notification needed direct stdout access. In a TUI session Claude Code owns the terminal. In an IDE session the IDE owns it. Either way, the hook couldn't reliably emit escape sequences without stepping on the host.

terminalSequence flips it. Your hook returns a JSON object with the escape sequence it wants emitted. Claude Code emits it at a moment where the rendering won't corrupt. The hook never touches the terminal directly.

What this unlocks in practice:

  • Background-agent hooks can push status to the terminal title without race conditions.
  • PreToolUse / PostToolUse hooks can fire OS notification center events on macOS or Windows without spawning osascript or BurntToast from inside the hook.
  • IDE-hosted sessions get notifications that actually work, instead of stdout output that disappears into the IDE's pseudo-terminal.

If you've been running a notify-on-completion hook in VS Code or Cursor and felt like it worked maybe half the time, that's the fix. Migrate the hook to terminalSequence, let Claude Code handle timing.

ANTHROPIC_WORKSPACE_ID: workload identity federation gets token scoping

Invisible if you're a solo user. Real if you're running Claude Code through workload identity federation on GCP, AWS, or Azure.

The gap this closes: federation lets a workload assume a short-lived token without storing long-lived credentials. But the token issuer doesn't know which workspace the workload belongs to – that has to come in from the caller. Without a workspace context, federated-auth setups had two bad options. Use long-lived API keys (which defeats the point of federation) or use workspace-agnostic tokens (which defeats per-team controls).

ANTHROPIC_WORKSPACE_ID is the missing context. Set the env var, the federated token carries workspace scoping, and your team-level rate limits, model access lists, and audit logs apply.

Pair with the 2.1.141 Bedrock fix – awsCredentialExport now runs reliably instead of skipping in shell-init edge cases – and enterprise auth gets noticeably tighter.

Rewind: "Summarize up to here"

Rewind has been the undo button since it landed. Pick a turn, roll back, the session reverts. 2.1.141 adds a second mode:

Rewind menu: added "Summarize up to here" feature.

Pick a turn, choose "Summarize up to here" instead of "Roll back to here," Claude Code compresses everything before that point and keeps going. Manual mid-session compaction with a precise cutoff.

Why this matters more than it looks: auto-compaction fires at a fixed window threshold. It catches whatever's in the buffer at the moment it fires. If your session has a clean break point – research phase done, debugging detour resolved, exploration concluded – auto-compaction won't catch it. You drag the resolved context forward (wasting window) or you /clear and lose the conclusion.

"Summarize up to here" is the third option. Compress the resolved phase. Keep the conclusion. Keep going.

Heavy users who hit context-window pressure will get the most out of this. Everyone else won't notice, which is the right shape for a feature like this.

claude agents --cwd and background-agent mode preservation

Two related fixes. Together they patch the "background agents are unusable for parallel work" complaint that's been around since the agents view shipped.

claude agents --cwd <path> scopes the session list to a directory. Before this, claude agents listed every session on the machine, regardless of project. With multiple worktrees running in parallel – which is the whole point of background agents – the list was unscannable. Now you pass --cwd and you get one list per worktree.

Background agents preserve their current permission mode on reopen instead of reverting. Before 2.1.141, a background agent you started in plan mode could come back in auto mode after a reopen. Surprising at best. A plan-mode agent that quietly turned into an auto-mode agent is a footgun nobody asked for.

The third related fix: agents finishing work now move to a Completed status in the agents view, instead of leaving you guessing whether a session is done or stuck.

Three small fixes. Together they turn the agents view from a curiosity into a workflow tool. If you stopped running parallel background work because the UX wasn't there, it's worth another look.

The bug-fix wave: the loud ones

About 60 individual fixes in 2.1.141. The ones I'd flag:

transcript_path after a worktree switch is no longer stale. Hooks were receiving a path that pointed at the pre-switch transcript, silently breaking any hook that read it. If your multi-worktree hooks have been quietly failing, that's why. Fixed.

/model no longer changes the autocompact threshold in your other sessions. Cross-session side effect that was invisible until you wondered why a session you weren't touching just compacted itself. Fixed.

Enter no longer submits text while a permission prompt is open. The Enter would race against the dialog and could submit your message before the session was ready. Fixed.

Switching permission modes auto-dismisses prompts now. Used to leave the prompt sitting there waiting for input it would never get.

"View diff in your IDE" is back on file-edit permission prompts. Regression that quietly disappeared a few releases back. Click it, see the proposed edit as a real IDE diff before you approve.

Background side-queries (cost estimation, small auxiliary calls during a turn) now get the right model ID on Bedrock, Vertex, and Foundry. Cost dashboards reflect what actually ran, not the default.

/tui no longer drops your running shells and subagents when you switch to fullscreen. If you've been avoiding fullscreen mode because of this, it's safe again.

Crashed-session reopen no longer dispatches the same call twice. Cancelled prompts stay recoverable in up-arrow history. Multi-line statusline output stops overwriting itself. MCP HTTP/SSE auth status reflects reality. Remote MCP servers stop dropping on optional stream failures. Remote Control connector 401s gone. SDK native binary is findable on Linux now. Alt+V image paste works on Windows. AskUserQuestion stops hiding the chat content above it. Idle background sessions no longer auto-retire after 5 minutes (which made them useless for any "walk away, come back" pattern).

That's a partial list. Another ~40 fixes cover voice mode on WSL, redaction in feedback, plugin install when the marketplace ref is stale, OTel span emission timing, and a dozen smaller things. The shape is clear. This is the polish release that retires the long tail of 2.1.139's rough edges.

Also shipped (catch-all)

A few smaller adds and changes that didn't get their own section:

  • CLAUDE_CODE_PLUGIN_PREFER_HTTPS forces plugin cloning over HTTPS instead of SSH. Useful in environments where SSH to GitHub is blocked.
  • /feedback now includes recent sessions (last 24 hours by default, last 7 days as an option). Anthropic can debug your real context, not just your description of it.
  • The auto-mode permission dialog finally tells you which permissions.ask rule fired. No more guessing.
  • The spinner during extended thinking communicates that work is still happening instead of looking stuck.
  • /plugin menu navigation: tab switching, full keyboard support.
  • Bedrock's awsCredentialExport always runs when configured instead of skipping in shell-init edge cases.
  • VSCode's in-chat mic gives feedback on silence.
  • WSL voice-mode errors finally suggest sox libsox-fmt-pulse when that's the actual blocker.

What's missing from 2.1.140

A note on the in-between release. 2.1.140 was light. About 11 changes, mostly settings hot-reload and managed-settings polish. Two worth flagging:

Agent tool subagent_type matching is case- and separator-insensitive now. If you've been passing Code-Reviewer and watching the call fail because the agent is registered as code-reviewer, that's the fix. Names match regardless of case or hyphenation.

/loop no longer schedules redundant task-polling wakeups. The bug was firing wakeups for harness-tracked work that would notify on completion anyway. Burning prompt cache for no benefit. Fixed.

Should you update?

Yes, with two caveats.

If your hooks fire desktop notifications, terminalSequence is worth migrating to. Direct-stdout notification hooks will keep working but won't behave consistently across TUI and IDE-hosted sessions.

If you run background agents across worktrees in parallel, 2.1.141 is the version where it finally works. claude agents --cwd, permission-mode preservation, Completed status. Three small fixes turn the agents view from a curiosity into a workflow tool.

Beyond those two, the bug-fix wave is the bigger story. If you've been silently working around the long-tail issues from 2.1.139 – stale transcript paths, autocompact thresholds bleeding across sessions, Enter racing against permission prompts – they're gone.

Frequently asked questions

What is the terminalSequence field in Claude Code 2.1.141 hooks? terminalSequence is a new field in hook JSON output that lets hooks emit terminal escape sequences (for desktop notifications, title bar updates, etc.) without directly controlling the terminal. Claude Code handles the emission timing so the sequence doesn't corrupt the host's rendering. Useful for background agents and IDE-hosted sessions where the hook doesn't own stdout.

What does ANTHROPIC_WORKSPACE_ID do in Claude Code 2.1.141? ANTHROPIC_WORKSPACE_ID is a new environment variable that scopes workload identity federation tokens to a specific workspace. Without it, federated-auth setups had to choose between long-lived API keys or workspace-agnostic tokens. Set the env var and the federated token carries workspace scoping, so team-level rate limits, model access lists, and audit logs apply to the request.

How does "Summarize up to here" work in the Claude Code Rewind menu? Open the Rewind menu, pick a turn, choose "Summarize up to here" instead of "Roll back to here." Claude Code compresses everything before that point into a synopsis and keeps going. It's manual mid-session compaction with a precise cutoff, useful when a phase is done and you want to keep the conclusion without dragging full context forward.

What does claude agents --cwd do? claude agents --cwd <path> scopes the session list to a specific working directory. Without it, claude agents lists every session on the machine. With multiple worktrees running in parallel, the unscoped list was unusable. The flag gives you one session list per worktree.

Were Claude Code 2.1.134 and 2.1.135 ever released? No. Anthropic's official changelog jumps from 2.1.133 to 2.1.136. 2.1.134 and 2.1.135 don't appear publicly. Same pattern as 2.1.127 and 2.1.130 before them – likely internal builds that never shipped to users.

Why did my Claude Code background agent revert to auto mode? Before 2.1.141, background agents reverted to the default permission mode on reopen instead of preserving the mode they were started in. If you started an agent in plan mode and reopened it later, it could come back in auto mode. 2.1.141 fixes this – background agents now preserve their current permission mode across reopens.

Why were my hooks getting a stale transcript_path after switching worktrees? Before 2.1.141, hooks received a transcript_path that pointed at the transcript from before the worktree switch, silently breaking any hook that read the transcript. 2.1.141 fixes the path propagation so hooks always receive the current worktree's transcript.

What changed with /model and autocompact thresholds in Claude Code 2.1.141? Before 2.1.141, running /model in one session was silently mutating the autocompact threshold in your other concurrent sessions – an invisible cross-session side effect. 2.1.141 isolates the change to the session where /model was run. Other sessions keep their own thresholds.

How do I scope a Claude Code workload identity federation token to a workspace? Set the ANTHROPIC_WORKSPACE_ID environment variable to the target workspace ID in the environment that runs Claude Code. The federated token issued for that environment will carry workspace scoping, applying workspace-level rate limits, model access lists, and audit logs to all requests from that workload. Available in 2.1.141 and later.

Should I update to Claude Code 2.1.141? Yes. The polish wave is large enough that most heavy users will hit at least one fix they were silently working around. The four new adds – terminalSequence, ANTHROPIC_WORKSPACE_ID, claude agents --cwd, and Rewind summarize – are each worth the version bump if any of them touches your workflow. Background-agent users specifically should update – the combination of --cwd scoping and permission-mode preservation turns the agents view into a usable parallel-work tool.

Where to go from here

The running release-notes coverage on WotAI: 2.1.116, 2.1.121, 2.1.126, 2.1.131, now 2.1.141.

The patterns we're using around these features in real production work – background agents in parallel worktrees, hook-driven notifications, MCP server orchestration – live in WotAI Skool. 760+ builders, weekly office hours.

Anthropic's official changelog is the source of truth. We just pull out the parts that matter, with the context you'd otherwise have to dig out yourself.

– Alex

#claude-code#anthropic#Release Notes#AI Development#MCP#Plugins#Hooks#Background Agents
Live Workshop

Production-Grade Claude Code in 5 Days

Set up Claude Code the right way - from someone who ships with it daily.

$297$497Early BirdNext cohort: June 2026 Cohort

100% satisfaction guarantee. Full refund if you're not happy after the first session.