Skip to content
AI Primer
release

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.

3 min read
Claude Code 2.1.142 adds `claude agents` flags and fixes macOS sleep reconnects
Claude Code 2.1.142 adds `claude agents` flags and fixes macOS sleep reconnects

TL;DR

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_TIMEOUT instead 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, and Ctrl+C works 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.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 3 threads
claude agents flags1 post
ripgrep by default1 post
background session fixes2 posts
Share on X