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.
TL;DR
- New
claude agentsflags 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 agentslet 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 —
/plugindetails pane andclaude plugin detailsnow show which LSP servers a plugin provides - Root-level SKILL.md support — plugins with
SKILL.mdat the root and noskills/subdirectory are now surfaced as skills - GitHub App connection warnings —
/web-setupnow warns before replacing an existing GitHub App connection
Fixed
- MCP tool timeout —
MCP_TOOL_TIMEOUTnow 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 agents —
claude agents"v to open in editor" now respects your shell's$EDITOR/$VISUALinstead of daemon default - Windows network-drive deadlock —
claude agentsno longer deadlocks with network-drive working directories; Ctrl+C works during startup - Terminal color bleed — fixed background-color bleed when attaching to
claude agentssessions from 256-color-only terminals - Permission persistence —
--dangerously-skip-permissionsnow 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
/modelbreadcrumbs into transcripts - Plugin path validation —
skills: ["./"]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 —
/pluginbrowse pane no longer shows "0 installs" for newly published plugins - Plugin advisory naming — now names every
plugin.jsonkey 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-20250514suggestion from Usage Policy refusal messages
Update via brew upgrade claude-code or download the latest version from code.claude.com.
Source: Claude Code