Claude Code 2.1.142: Agent Flags, Opus 4.7 Fast Mode, Daemon Fixes

Claude Code 2.1.142 adds eight new agent configuration flags, upgrades fast mode to Opus 4.7, and fixes critical daemon stability issues including macOS sleep/wake crashes and Windows network-drive deadlocks.

Claude Code 2.1.142: Agent Flags, Opus 4.7 Fast Mode, Daemon Fixes

TL;DR

  • New claude agents flags for configuring background sessions: --add-dir, --settings, --mcp-config, --plugin-dir, --permission-mode, --model, --effort, --dangerously-skip-permissions
  • Fast mode now defaults to Opus 4.7 (was 4.6); override with CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1
  • Major daemon stability fixes: macOS sleep/wake crashes, Windows network-drive deadlocks, plugin cache corruption, background session reconnection

New

  • Agent configuration flags — eight new flags for claude agents let you control model, effort level, MCP config, permissions, and plugin directories when dispatching background sessions
  • Opus 4.7 in fast mode — faster inference by default; pin to 4.6 if needed with the environment variable override
  • LSP server visibility/plugin details pane and claude plugin details now show which LSP servers a plugin provides
  • Root-level SKILL.md support — plugins with SKILL.md at the root and no skills/ subdirectory are now surfaced as skills
  • GitHub App connection warnings/web-setup now warns before replacing an existing GitHub App connection

Fixed

  • MCP tool timeoutMCP_TOOL_TIMEOUT now correctly raises per-request fetch timeout for remote HTTP and SSE servers (was capped at 60 seconds)
  • Git worktree conflicts — background sessions now recognize pre-existing git worktrees, unblocking Edit and EnterWorktree
  • macOS sleep/wake crashes — daemon now detects clock jumps instead of treating them as idle time, preventing session disappearance and reconnect failures
  • Daemon upgrade crashes — daemon exits cleanly after binary upgrade (e.g., brew upgrade), preventing dispatched agents from crash-looping
  • Chrome extension deadlock — background agents no longer crash-loop when Claude-in-Chrome extension is connected without a shared tab
  • Link clicking in attached sessions — background worker's headless browser shim no longer applies while attached
  • Editor selection in agentsclaude agents "v to open in editor" now respects your shell's $EDITOR/$VISUAL instead of daemon default
  • Windows network-drive deadlockclaude agents no longer deadlocks with network-drive working directories; Ctrl+C works during startup
  • Terminal color bleed — fixed background-color bleed when attaching to claude agents sessions from 256-color-only terminals
  • Permission persistence--dangerously-skip-permissions now persists across retire/wake cycles
  • Session title derivation — titles no longer incorrectly derived from URLs when first message is a link
  • Duplicate model requests — remote clients no longer inject duplicate /model breadcrumbs into transcripts
  • Plugin path validationskills: ["./"] no longer shows false "path escapes plugin directory" error
  • Plugin cache cleanup — no longer deletes active plugin version directory when installation metadata is missing
  • Plugin install counts/plugin browse pane no longer shows "0 installs" for newly published plugins
  • Plugin advisory naming — now names every plugin.json key that shadows a default folder
  • Context compaction — first summarize attempt now seeds from original request's overflow size, avoiding wasted near-full-context retry
  • Hook configuration errors — clearer error message when configuring prompt- or agent-type hooks for SessionStart/Setup/SubagentStart

Removed

  • Stale /model claude-sonnet-4-20250514 suggestion from Usage Policy refusal messages

Update via brew upgrade claude-code or download the latest version from code.claude.com.

Source: Claude Code