Claude Code 2.1.139

💡

Adds the agent view (Research Preview) for tracking every Claude Code session in one place, and a `/goal` command that keeps Claude working across turns until a completion condition is met. Hooks gain an exec form (`args: string[]`) and a `PostToolUse` `continueOnBlock` option, MCP stdio servers now receive `CLAUDE_PROJECT_DIR`, and `/mcp` Reconnect picks up `.mcp.json` edits without a restart. Note: Remote Control, `/schedule`, claude.ai MCP connectors, and notification preferences are now disabled whenever `ANTHROPIC_API_KEY` / `apiKeyHelper` / `ANTHROPIC_AUTH_TOKEN` is set, even alongside a Claude.ai login.

🔗 Official announcement →

This article is a summary based on official documentation.

What changed

Claude Code 2.1.139 shipped on May 11, 2026. The headline additions are the agent view (Research Preview) for tracking every running, blocked, or done session in one place, and /goal, which lets Claude keep working across turns until a stated completion condition is met. Smaller commands round it out — /scroll-speed for live mouse-wheel tuning, claude plugin details for component and token previews, and transcript-view keyboard navigation. Automation and platform plumbing gets a wide pass too: hook exec form (args: string[]), PostToolUse continueOnBlock, CLAUDE_PROJECT_DIR propagated to MCP stdio servers, and /mcp Reconnect picking up .mcp.json edits without a restart. One behavior change to flag — when ANTHROPIC_API_KEY / apiKeyHelper / ANTHROPIC_AUTH_TOKEN is set, Remote Control, /schedule, claude.ai MCP connectors, and notification preferences are now disabled even if a Claude.ai login is also present.

New features

  • agent view (Research Preview) — every session in one list

    As multiple Claude Code sessions stack up, telling which is running, which is blocked on you, and which is done turns into manual bookkeeping. claude agents launches a single list of every session in those three states. See the docs for details.

  • /goal — keep working until a completion condition is met

    Long tasks often required nudging Claude turn-by-turn to make sure each step landed. /goal lets you state a completion condition once, and Claude keeps working across turns until it’s met. An overlay panel shows live elapsed time, turns, and tokens. Works in interactive mode, -p mode, and Remote Control.

  • /scroll-speed — tune mouse-wheel scroll speed with a live preview

    Wheel scroll feel varies across terminals and IDEs and is hard to dial in blindly. /scroll-speed lets you adjust it with a live preview.

  • claude plugin details <name> — preview components and per-session token cost

    There was no way to inspect what a plugin actually contributes — commands, hooks, MCP servers — or how much context it costs per session before installing. claude plugin details <name> shows the component inventory and projected per-session token cost.

  • transcript view keyboard navigation

    Finding a specific user prompt in a long transcript meant wheel-scrolling. Now ? opens a shortcut help, {/} jump between user prompts, and v toggles the shortcut panel.

  • hook args: string[] (exec form) — spawn the command without a shell

    Hook commands needing path placeholders kept hitting shell-quoting issues. The exec form spawns the command directly without a shell, so placeholders never need quoting.

  • hook continueOnBlock for PostToolUse — feed the rejection back to the model and continue

    A PostToolUse hook that returned a block would halt the turn entirely, leaving no path for the model to recover. Setting continueOnBlock: true passes the hook’s rejection reason back to the model and keeps the turn going.

Improvements

  • CLAUDE_PROJECT_DIR available to MCP stdio servers

    Hooks already received CLAUDE_PROJECT_DIR, but MCP stdio servers didn’t — so anything that needed a project-rooted path had to thread it in by hand. stdio MCP servers now get CLAUDE_PROJECT_DIR in their environment, and plugin configs can reference ${CLAUDE_PROJECT_DIR} in their command field.

  • /mcp Reconnect picks up .mcp.json edits + shows HTTP status/URL on failure

    Changes to .mcp.json previously required a restart to take effect. Reconnect now reloads the file in place, and when a reconnect fails, it surfaces the HTTP status code and target URL to help diagnose.

  • /context all per-skill token estimates — model tokenizer + rounded values

    Per-skill token estimates didn’t match the model’s actual tokenizer, so the numbers drifted. They now use the model’s tokenizer and display as rounded values for readability.

  • claude plugin install <name>@<marketplace> auto-refreshes the marketplace

    A stale marketplace cache could report a freshly listed plugin as “not found.” The install command now auto-refreshes the marketplace and retries before reporting not found.

  • /plugin installed-plugin details — clean hook event names and MCP server names

    The installed-plugin detail view rendered hook events and MCP server names in a format that was hard to scan. Now displayed cleanly.

  • /context shows the providing plugin’s name for plugin-sourced skills

    When a skill comes from a plugin, it wasn’t obvious which plugin contributed it. /context now shows the providing plugin’s name alongside the skill.

  • Remote MCP server reconnect retry — enabled for all users

    Transient network failures on remote MCP server connections previously got a retry path only for some users. The retry is now enabled for everyone.

  • Subagent API requests carry agent ID headers + OTEL attributes

    Subagent traffic was hard to distinguish in telemetry. Subagent requests now include x-claude-code-agent-id / x-claude-code-parent-agent-id headers, and claude_code.llm_request OTEL spans include agent_id / parent_agent_id attributes.

  • Compaction prompt preserves sensitive user instructions

    Important user instructions could be dropped during conversation compaction. The compaction prompt now asks the model to preserve them.

  • API-key precedence policy — Remote Control / /schedule / claude.ai MCP / notifications disabled when an API key is set

    When ANTHROPIC_API_KEY / apiKeyHelper / ANTHROPIC_AUTH_TOKEN is set, Remote Control, /schedule, claude.ai MCP connectors, and notification preferences are disabled — even if a Claude.ai login also exists. Unset the API key variable to use these features.

Bug fixes

Auth & sessions

  • Deadlock where expired credentials combined with the forceRemoteSettingsRefresh policy blocked claude auth login / logout / status with no recovery path — fixed.

Permissions & sandbox

  • autoAllowBashIfSandboxed not auto-approving commands containing $VAR / $(cmd) shell expansions — fixed.
  • Skill(name *) permission rule wildcard not behaving as a prefix match (matching Bash(ls *)) — fixed.

MCP & hooks

  • Unbounded memory growth when an HTTP/SSE MCP server streamed non-protocol data — response bodies are now capped at 16 MB per SSE frame.
  • Hooks writing to the terminal corrupting an on-screen interactive prompt — hooks now run without terminal access.
  • MCP resources from disconnected servers lingering in @server: autocomplete — fixed.
  • Silent exit 1 when 10+ MCP servers were configured and the cache directory was unwritable — the error message now includes the underlying cause.

Plugins

  • Plugin details failing to load when the marketplace key differed from the manifest name — fixed.
  • Plugin dependency resolution leaving a stale count when manifest name differed from source identifier — fixed.
  • claude plugin update not preserving cross-plugin symlinks inside a marketplace — fixed.

Settings & reloads

  • Settings hot-reload not detecting edits to a symlinked ~/.claude/settings.json — fixed.

Model picker

  • /model picker “Default” row not reflecting ANTHROPIC_DEFAULT_OPUS_MODEL / ANTHROPIC_DEFAULT_SONNET_MODEL overrides — fixed.
  • Redundant “Current model” row shown for third-party users whose model was set to the opus alias — fixed.
  • Legacy Opus picker entry on PAYG 3P providers resolving to the same model as the default entry — fixed.

Streams & timers

  • Spurious “stream idle timeout” five minutes after a response completed — caused by the watchdog timer not being cleared on stream cancellation; fixed.
  • Task polling and fs.watch being resurrected when the last subscriber left while a fetch was in flight — fixed.

UI & terminal

  • Typing cursor blinking on tab names, list pointers, and select rows in dialogs — fixed.
  • Transcript view letter shortcuts not working after mouse click — fixed.
  • Bash-mode up-arrow history repeating the first entry and clobbering the in-progress draft — fixed.
  • Pasting or dropping multiple images only inserting the last one — fixed.
  • Hyperlinks using unreadable dark navy on dark themes — they now adapt to the active theme.
  • Mouse wheel scroll speed in Cursor and VS Code 1.92–1.104 — trackpad scrolls at a steady rate; mouse wheel keeps ~3 lines per notch.
  • Scroll behavior in Windows Terminal and VS Code when attached to background sessions — fixed.

Grep, diffs & rendering

  • Two-file diff snippets over-reporting the number of truncated lines by one — fixed.
  • Grep results not relativizing Windows drive-letter paths and count mode reporting wrong totals for single-file paths — fixed.
  • Border-embedded text overflowing on CJK / emoji due to visual cell width miscalculation — fixed.
  • Fuzzy-match highlighting splitting emoji and astral-plane characters mid-pair — fixed.
  • Skill argument names containing regex metacharacters breaking argument substitution — fixed.
  • ProgressBar rendering a full block for an almost-full fractional cell — fixed.
  • Insights Time-of-Day chart skewing when a session has an unparseable timestamp — fixed.
  • Keybindings using only the cmd/super/win modifier being flagged as unparseable — fixed.
  • claude_code.active_time.total OpenTelemetry metric not being emitted in --print mode — fixed.

VS Code

  • Cmd/Ctrl+Shift+T reopens the most recently closed session tab — configurable via claudeCode.enableReopenClosedSessionShortcut.

Notes

  • API-key environment variables now disable Remote Control / /schedule / claude.ai MCP / notifications — setting ANTHROPIC_API_KEY / apiKeyHelper / ANTHROPIC_AUTH_TOKEN disables these features regardless of whether a Claude.ai login is also present. Setups that combined both auth modes will see behavior changes — check before upgrading.
  • agent view is a Research Preview — UI and behavior may change; don’t make a production workflow depend on it before reading the docs.
  • Hook exec form (args: string[]) — if you’ve been fighting shell quoting on hook commands with path placeholders, the exec form spawns the command directly without a shell.
  • PostToolUse continueOnBlock: true — keep the guardrail but pass the rejection back to the model and let the turn continue, instead of dead-ending on a single block.
  • CLAUDE_PROJECT_DIR in MCP stdio servers — project-rooted path logic in stdio MCP servers can read CLAUDE_PROJECT_DIR directly. Plugin command fields can reference ${CLAUDE_PROJECT_DIR} too.
  • /mcp Reconnect hot-reloads .mcp.json — edit the file and Reconnect; no restart required. Failures now surface HTTP status and target URL to make diagnosis easier.
  • 16 MB SSE frame cap — if any MCP server streams large non-protocol payloads over SSE, expect responses to be truncated past 16 MB per frame; chunk the payload server-side if needed.