AI Catchup

Claude Code 2.1.142: `claude agents` Gains Session Flags, Fast Mode Defaults to Opus 4.7, MCP Tool Timeout Honored

By 9 min read

Anthropic shipped Claude Code 2.1.142 on May 14, 2026. The release adds eight session-configuration flags to `claude agents` (`--add-dir`, `--settings`, `--mcp-config`, `--plugin-dir`, `--permission-mode`, `--model`, `--effort`, `--dangerously-skip-permissions`), flips fast mode's default model from Opus 4.6 to Opus 4.7, and fixes `MCP_TOOL_TIMEOUT` not raising the per-request fetch timeout for remote HTTP/SSE MCP servers -- a regression that capped tool calls at 60 seconds regardless of configuration.

Anthropic shipped Claude Code 2.1.142 on May 14, 2026. The headline is a fleshed-out claude agents dispatch surface: eight new flags that let each background session override directories, settings, MCP config, plugin directories, permission mode, model, effort, and the permission bypass. Behind that, fast mode's default moves from Opus 4.6 to Opus 4.7, MCP_TOOL_TIMEOUT finally raises the underlying fetch timeout for remote HTTP/SSE servers, and a series of background-session stability fixes land for the agent view that shipped in 2.1.139.

For where Claude Code sits this quarter, 2.1.133's worktree-base reversal and MCP OAuth proxy fixes are the right context, and the post-mortem on the spring quality regression is the trajectory anchor.

Key Takeaways

  • Eight new claude agents flags. --add-dir, --settings, --mcp-config, --plugin-dir, --permission-mode, --model, --effort, --dangerously-skip-permissions -- all configure dispatched background sessions independently of the daemon defaults.
  • Fast mode defaults to Opus 4.7. Previously Opus 4.6. Set CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 to pin fast mode to 4.6.
  • MCP_TOOL_TIMEOUT now honored end to end. The env var raises the per-request fetch timeout for remote HTTP and SSE MCP servers, lifting the 60-second cap that previously applied regardless of configuration.
  • Root-level SKILL.md plugins. Plugins with a root SKILL.md and no skills/ subdirectory now register as a skill, simplifying single-skill plugins.
  • Background-session stability. Pre-existing worktrees recognized, daemon survives macOS sleep/wake by detecting clock jumps, clean daemon exit on binary upgrade, claude --bg --dangerously-skip-permissions persists across retire/wake.
  • /plugin shows LSP servers. The details pane and claude plugin details now list LSP servers a plugin provides.
  • Better reactive compaction. First summarize attempt seeds from overflow size, avoiding a wasted near-full-context retry.
  • Hook config error clarity. Configuring a prompt- or agent-type hook for SessionStart/Setup/SubagentStart now shows a clear "use a command-type hook instead" error.

The claude agents Flag Set

The most consequential addition is the new flag set for dispatched background sessions. Quoting the changelog:

Added new claude agents flags: --add-dir, --settings, --mcp-config, --plugin-dir, --permission-mode, --model, --effort, and --dangerously-skip-permissions to configure dispatched background sessions

The agent view (claude agents) shipped in 2.1.139 as a single dashboard of every Claude Code session -- running, blocked, or done. The original version dispatched background sessions with the daemon's defaults: same working directory roots, same settings, same MCP config, same plugin tree, same permission mode, same model, same effort.

That works for fan-out where every agent does the same kind of work. It breaks the moment you want heterogeneous dispatch: one agent at low effort running tests, another at high effort writing a migration, a third with a permission bypass for a sandboxed throwaway. Until 2.1.142, each of those needed a separate top-level Claude Code config or a wrapper script.

The new flags map one-to-one to the corresponding session-level settings:

FlagConfigures
--add-dirAdditional working directories for the session
--settingsPath to a settings file overriding the daemon default
--mcp-configPath to an MCP config file overriding .mcp.json
--plugin-dirPlugin directory override
--permission-modeSession permission mode (auto, plan, etc.)
--modelModel override for the dispatched session
--effortEffort level for the dispatched session
--dangerously-skip-permissionsPermission-bypass flag

The pattern matches the existing top-level Claude Code CLI flags, which is the right call -- it means knowledge transfers and there is no second flag dialect to learn. The use case is the natural one: you can now launch a dashboard full of agents where each one is configured exactly for its job.

Fast Mode Now Defaults to Opus 4.7

Fast mode is Claude Code's option to swap in a faster Opus variant with the same model family. Until 2.1.142, the default was Opus 4.6. In 2.1.142 the default moves to Opus 4.7.

The escape hatch is documented in the changelog:

Fast mode now uses Opus 4.7 by default (previously Opus 4.6). Set CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 to pin fast mode to Opus 4.6

The override exists because some users build muscle memory around a specific model's quirks -- prompt formatting that one model handles better than another, tool-call patterns that calibrate to one's behavior. Letting them pin to 4.6 explicitly is the right move during a generation transition. If you have not tuned to a specific Opus version, the new default is what you want.

MCP_TOOL_TIMEOUT Honored End to End

The MCP tool timeout fix is the kind of plumbing bug that only matters until you hit it, at which point it is the only thing that matters:

Fixed MCP_TOOL_TIMEOUT not raising the per-request fetch timeout for remote HTTP and SSE MCP servers, which capped tool calls at 60 seconds regardless of the configured value

Two layers were involved. The protocol-level timeout is what MCP_TOOL_TIMEOUT is supposed to control -- how long Claude Code waits for a tool call to complete before giving up. The fetch-level timeout is the underlying HTTP request's idle timeout, which for remote HTTP and SSE MCP servers was fixed at 60 seconds.

When the protocol-level timeout was higher than 60 seconds, the fetch layer would cancel the request first and the protocol layer would see a connection error rather than a clean timeout. The user-visible effect: every remote MCP tool call that took longer than 60 seconds failed with what looked like a network error, regardless of what MCP_TOOL_TIMEOUT was set to.

2.1.142 routes the env var through to the fetch timeout. If you run remote MCP servers with long-running tools -- code execution, data analysis, anything that takes more than a minute -- this is the version to upgrade to. The configured value now actually applies.

Background-Session Stability

A cluster of fixes around claude agents and background sessions land in 2.1.142. The most user-visible:

  • Pre-existing worktree recognition. Background sessions now recognize pre-existing git worktrees, fixing a state where Edit was blocked while EnterWorktree refused to create a duplicate. If you ever hit a "worktree already exists" wall in a dispatched agent, this is the fix.
  • macOS sleep/wake clock-jump detection. The daemon now detects clock jumps instead of treating them as elapsed idle time. Before, sessions disappeared and daemon reconnect failed after macOS sleep/wake because the daemon mistook the sleep duration for genuine inactivity and tore down state.
  • Clean daemon exit on binary upgrade. When brew upgrade or another mechanism replaces the Claude Code binary, the daemon now exits cleanly rather than crash-looping dispatched agents on the deleted path. Real outage cause for anyone running long-lived claude agents sessions on macOS.
  • claude --bg --dangerously-skip-permissions persists across retire/wake. Before, the permission bypass would silently drop when the daemon retired the session and reawakened it, requiring re-invocation. The flag now sticks.
  • Empty placeholder sessions retired. Empty idle background sessions left over from backgrounding a fresh REPL are now automatically retired by the daemon after 5 minutes (this fix actually landed in 2.1.141 and remains in 2.1.142).

Together these are the kind of background-session bugs that show up only after enough hours of real use to accumulate sleep cycles, upgrades, and worktree state. The fact that they all land in one release suggests Anthropic is now driving the agent view from real production use, not just the launch demo.

Other Notable Changes

  • /plugin shows LSP servers. The details pane and claude plugin details now list LSP servers a plugin provides. Helpful for plugin authors and users debugging which language servers a plugin actually exposes.
  • /web-setup warns before replacing GitHub App connection. Previously silent.
  • Reactive compaction warm start. First summarize attempt now seeds from the original request's overflow size, avoiding a wasted near-full-context retry. For users who push context to its limits, this is a real latency improvement.
  • Hook config error clarity. Configuring a prompt- or agent-type hook for SessionStart, Setup, or SubagentStart now returns a clear "use a command-type hook instead" error rather than silent misbehavior.
  • Stale /model suggestion removed. Usage Policy refusal messages no longer suggest /model claude-sonnet-4-20250514, which referred to a retired model ID.
  • Background-color bleed fix. Attaching to a claude agents session from Apple Terminal or other 256-color-only terminals no longer bleeds background color.
  • Editor preference fix. claude agents "v to open in editor" now uses your shell's $EDITOR/$VISUAL instead of the daemon's default editor.
  • Plugin cache safety. Plugin cache cleanup no longer deletes the active plugin version directory when no installation metadata is present.
  • Click links while attached. Clicking links in an attached claude agents session works again; the background worker's headless browser shim no longer applies while attached.
  • Windows network-drive deadlock. claude agents no longer deadlocks on Windows with network-drive working directories, and Ctrl+C now works during startup.
  • Chrome extension crash-loop fix. Background agents no longer crash-loop when the Claude-in-Chrome extension is connected without a shared tab.
  • Session-title heuristic. Session titles are no longer derived from the URL when the first message is a link.
  • Redundant set_model cleanup. Remote clients sending redundant set_model requests no longer inject duplicate /model breadcrumbs into the transcript.

Why This Release Matters

2.1.142 is a claude agents maturation release. The flag set, the macOS sleep/wake fix, the binary-upgrade fix, the worktree recognition, the persistent --dangerously-skip-permissions, and the editor preference all point at the same thing: the agent view shipped in 2.1.139 is graduating from "research preview that works for the demo" to something Anthropic is willing to defend as the place you run multiple Claude Code sessions for real.

The MCP tool timeout fix is the other half. Anyone running remote MCP servers with non-trivial tools was hitting the 60-second cap whether they knew it or not; the fact that MCP_TOOL_TIMEOUT now actually controls the timeout is the difference between MCP-backed workflows being viable and being a 60-second tease.

Pair this with the post-mortem on the spring quality regression and the pattern is consistent: Anthropic is currently shipping Claude Code releases focused on the engineering substrate -- background-session reliability, multi-session ergonomics, MCP plumbing that respects configuration, plugin and skill registration that does what users expect. The headline features get bullet points; the substrate fixes are what makes Claude Code something you can leave running across a workday without nursing.

For the canonical reference, the Claude Code changelog is the durable source for everything in 2.1.142, and the agent view docs cover the claude agents surface that the new flags configure.

Frequently Asked Questions

What are the new `claude agents` flags in 2.1.142?

Eight flags that configure background sessions dispatched through `claude agents`: `--add-dir`, `--settings`, `--mcp-config`, `--plugin-dir`, `--permission-mode`, `--model`, `--effort`, and `--dangerously-skip-permissions`. Before 2.1.142, dispatched sessions inherited the daemon's defaults. Now each dispatch can override directories, settings, MCP config, plugin directories, permission mode, model, effort, and the permission bypass independently.

Why did fast mode change from Opus 4.6 to Opus 4.7?

Opus 4.7 is now the current Opus generation, so fast mode picks it by default. The escape hatch is `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1`, which pins fast mode to Opus 4.6 for users who depend on 4.6's behavior. Set the env var in your shell profile or settings if you need to stay on 4.6 specifically.

What is the MCP tool timeout fix?

`MCP_TOOL_TIMEOUT` is the environment variable that sets the maximum wait for an MCP tool call. In earlier 2.1.x versions, that variable controlled the protocol-level timeout but did not raise the underlying per-request fetch timeout for remote HTTP and SSE MCP servers, which capped at 60 seconds. The result: long-running remote MCP tool calls would always fail at 60 seconds regardless of what you set `MCP_TOOL_TIMEOUT` to. 2.1.142 routes the env var through to the fetch timeout so the configured value actually applies.

What is the plugin-as-skill change?

Plugins with a root-level `SKILL.md` and no `skills/` subdirectory are now surfaced as a skill. Before, only plugins with `skills/foo/SKILL.md` (or an explicit `skills` key in `plugin.json`) registered skills with Claude Code. The new behavior lets a single-skill plugin omit the wrapping `skills/<name>/` directory and just put `SKILL.md` at the plugin root. Helpful for the common case where a plugin is essentially one skill plus supporting files.

What background-session bugs were fixed?

Several. Background sessions now recognize pre-existing git worktrees instead of refusing to create a duplicate. The daemon detects clock jumps on macOS sleep/wake instead of treating them as elapsed idle time, fixing sessions disappearing and daemon reconnect failing after a sleep cycle. The daemon also exits cleanly after binary upgrades (e.g. `brew upgrade`) instead of crash-looping dispatched agents on the deleted path. And `claude --bg --dangerously-skip-permissions` now persists across retire/wake.

Are there other notable fixes in 2.1.142?

Yes. Reactive compaction now seeds the first summarize attempt from the original request's overflow size, avoiding a wasted near-full-context retry. Hook configuration errors for prompt- or agent-type hooks on `SessionStart`/`Setup`/`SubagentStart` now show a clear 'use a command-type hook instead' message. The stale `/model claude-sonnet-4-20250514` suggestion was removed from Usage Policy refusal messages. And plugin cache cleanup no longer deletes the active plugin version when installation metadata is missing.

Get the weekly AI Catchup

Tools, practices, and what matters -- in your inbox every Monday.