Anthropic: Claude Code v2.1.142 — Fast Mode default switches to Opus 4.7, new --add-dir and --mcp-config flags for background sessions
Claude Code v2.1.142 is the new Anthropic CLI agent release published on May 14, 2026. The fourth patch this week after v2.1.139, v2.1.140, and v2.1.141. It adds eight new flags for claude agents background sessions (--add-dir, --settings, --mcp-config, --plugin-dir, --permission-mode, --model, --effort, --dangerously-skip-permissions). Fast Mode default is now Opus 4.7 (previously Opus 4.6). Fixes MCP tool timeouts, git worktree recognition, macOS sleep daemon, and Windows network drive deadlock.
This article was generated using artificial intelligence from primary sources.
Anthropic released Claude Code v2.1.142 on May 14, 2026 — the fourth patch version this week after v2.1.139, v2.1.140, and v2.1.141. The release accelerates cadence and focuses on background agent sessions, a Fast Mode model upgrade, and critical fixes on macOS and Windows.
What do the new claude agents flags specifically enable?
Version 2.1.142 adds eight new flags to the claude agents command that manages background sessions:
--add-dir— explicitly adds a workspace directory to the session--settings— uses a specific settings file--mcp-config— configures the MCP server stack for the session--plugin-dir— points to a plugin directory--permission-mode— sets permission mode (allow-once, ask, deny)--model— selects the model (sonnet, opus, haiku)--effort— sets the effort level for reasoning models--dangerously-skip-permissions— skips permission prompts in CI scenarios
This approach eliminates the need for interactive config before launching a background session — everything can be specified in a single CLI call, which is critical for automated workflows.
What does the Fast Mode upgrade to Opus 4.7 change?
Fast Mode default now uses Claude Opus 4.7 (previously Opus 4.6). The change gives users faster output token generation with the enhanced reasoning capabilities that Opus 4.7 brings (available since April 16, 2026). Users who want to retain the previous behavior can set the CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 environment variable.
What critical fixes does it include?
Five key fixes address enterprise and cross-platform stability:
- MCP_TOOL_TIMEOUT now correctly extends fetch timeouts for remote MCP servers — previously tool calls were hard-capped at 60 seconds
- Git worktree recognition — background sessions now recognize pre-existing git worktrees instead of ignoring them
- macOS sleep/wake — daemon detects clock jumps as sleep cycle transitions instead of treating them as idle time
- Windows network drives — resolves deadlock when the working directory points to a network share
- Background agent stability — addresses crash-loop and improves daemon upgrade flow
Position in the week’s release cadence
Anthropic published 4 patch versions this week (v2.1.139 through v2.1.142) — an unprecedented pace even for enterprise CLI tooling. The tempo signals that the Claude Code stack is entering a phase of intense adoption where production feedback loops reach Anthropic engineering in real time.
Frequently Asked Questions
- What do the new --add-dir, --settings, and --mcp-config flags do?
- Claude Code v2.1.142 adds eight new flags to the claude agents command that manages background sessions — enabling explicit control over workspace directory, settings file, MCP configuration, plugin directory, permission mode, model, effort level, and skipping permissions in CI scenarios.
- How do you revert to the Opus 4.6 Fast Mode default?
- Version 2.1.142 changes the Fast Mode default from Opus 4.6 to Opus 4.7; users who want to retain Opus 4.6 can set the environment variable CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 before launching claude.
Related news
arXiv:2605.22502: Compiling agentic workflows into LLM weights achieves near-frontier quality at 100× lower cost
arXiv:2605.22794: MOSS shows agents that self-improve by rewriting their own source code
arXiv:2605.22535: TerminalWorld benchmark measures LLM agents on real Linux terminal tasks without simulation