Claude Code 2.1.142 adds `claude agents` flags and fixes macOS sleep reconnects
Claude Code 2.1.142 added new background-session flags for directories, permissions, model, effort, and MCP or plugin config while switching Grep to ripgrep by default. The release also fixes remote MCP timeouts and daemon reconnect failures after macOS sleep.

TL;DR
- ClaudeCodeLog's 2.1.142 changelog added eight new
claude agentsflags, covering extra directories, settings, MCP config, plugin directories, permission mode, model, effort, and--dangerously-skip-permissionsfor dispatched background sessions. - According to ClaudeCodeLog's release summary, Grep now defaults to ripgrep, while ClaudeCodeLog's prompt diff note says the tool description now explicitly tells Claude Code to use Grep for search tasks.
- ClaudeCodeLog's changelog says the release fixes a hard 60 second cap on remote HTTP and SSE MCP tool calls, plus a macOS sleep and wake bug that made background sessions disappear and daemon reconnects fail.
- Fast mode quietly moved to Opus 4.7 by default, per ClaudeCodeLog's changelog, and ClaudeCodeLog's CLI surface diff shows the temporary
CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODEenv var was removed one build later.
You can browse the official v2.1.142 release diff, inspect the CLI surface changes, and compare the prompt stats with the prior v2.1.140 release. Anthropic had already previewed agent view, and 2.1.142 looks like the CLI follow-through: more knobs for dispatched sessions, fewer daemon edge cases, and a stronger bias toward ripgrep-backed search.
claude agents flags
The new flags are all about configuring background sessions at dispatch time, not after the fact. ClaudeCodeLog's changelog lists these additions:
--add-dir--settings--mcp-config--plugin-dir--permission-mode--model--effort--dangerously-skip-permissions
That lines up with the earlier WesRoth agent view preview, which showed Anthropic pushing Claude Code toward a multi-session workflow with foreground and background handoffs.
ripgrep by default
The visible product change is small, but the prompt-level change is more interesting. ClaudeCodeLog's release summary says Grep now uses ripgrep by default, and the linked tool description diff says Claude Code is now instructed to always use Grep for search tasks.
That wording first appeared in the 2.1.140 additional changes, so 2.1.142 looks less like a sudden tool swap and more like Anthropic hardening a search preference across consecutive builds.
background session fixes
Most of the bug list is background-agent plumbing. The notable fixes in ClaudeCodeLog's changelog are:
- Remote MCP timeouts now respect
MCP_TOOL_TIMEOUTinstead of still dying around 60 seconds. - The daemon now detects clock jumps after macOS sleep and wake, instead of treating them as idle time and dropping sessions.
- Upgrades no longer leave the daemon running from a deleted binary path, which had caused dispatched agents to crash-loop after
brew upgrade. - Windows network-drive startups no longer deadlock
claude agents, andCtrl+Cworks during startup. - Attached sessions no longer inherit the headless browser shim that had broken clicking links.
The /goal rough edges were already surfacing in the wild, including jeffscottward's timeout report, and the 2.1.140 release had fixed a separate case where /goal could hang behind hook settings.
fast mode and prompt mix
The release also changes defaults and internal weighting. ClaudeCodeLog's changelog says fast mode now uses Opus 4.7 by default, with CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 left as the pin-back escape hatch.
The metadata in ClaudeCodeLog's prompt stats update shows only a 3.0 kB bundle increase, but prompt files rose by 3 and prompt tokens rose by 3,681, with tool tokens moving from 47.3 percent to 51.0 percent of the prompt mix. The same post also notes that TEAM_MEMORY_SYNC_URL was removed, alongside the CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE flag that had telegraphed the default-model switch one version earlier.