# Claude 代理工具 v2.1.142 版本更新

- 来源：Claude Code：GitHub Releases（RSS）
- 作者：ashwin-ant
- 发布时间：2026-05-15 06:55
- AIHOT 分数：63
- AIHOT 标记：精选
- AIHOT 链接：https://aihot.virxact.com/items/cmp637phz0jbmsljxj94mjfjv
- 原文链接：https://github.com/anthropics/claude-code/releases/tag/v2.1.142

## 精选理由

Claude Code 把 Agent 配置折腾得更顺手了，后台任务死锁、睡眠唤醒崩掉这类老毛病也修了一串，如果你的 Dispatch Agent 经常掉链子，这次升级很实在。

## AI 摘要

Claude 代理工具发布 v2.1.142 版本。本次更新新增了 `--add-dir`、`--settings`、`--model` 等 8 个用于配置后台会话的命令行标志，并将 Fast 模式的默认模型升级为 Opus 4.7。插件功能得到增强，拥有根目录 `SKILL.md` 的插件现可被识别为技能，插件详情面板会显示其提供的 LSP 服务器。此外，版本修复了超过 15 项问题，包括 MCP 工具超时设置失效、后台会话在系统休眠后异常断开、守护进程升级后无法正常退出、Windows 网络驱动器工作目录下死锁等关键错误，并改进了响应式压缩和钩子配置错误提示。

## 正文

What's changed

Added new claude agents flags: --add-dir, --settings, --mcp-config, --plugin-dir, --permission-mode, --model, --effort, and --dangerously-skip-permissions to configure dispatched background sessions

Fast mode now uses Opus 4.7 by default (previously Opus 4.6). Set CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1 to pin fast mode to Opus 4.6

Plugins with a root-level SKILL.md and no skills/ subdirectory are now surfaced as a skill

The /plugin details pane and claude plugin details now show LSP servers a plugin provides

/web-setup warns before replacing an existing GitHub App connection

Fixed MCP_TOOL_TIMEOUT not raising the per-request fetch timeout for remote HTTP and SSE MCP servers, which capped tool calls at 60 seconds regardless of the configured value

Fixed background sessions not recognizing pre-existing git worktrees, blocking Edit while EnterWorktree refused to create a duplicate

Fixed background sessions disappearing and daemon reconnect failing after macOS sleep/wake — the daemon now detects clock jumps instead of treating them as elapsed idle time

Fixed daemon not exiting cleanly after the binary is upgraded (e.g. brew upgrade), causing dispatched agents to crash-loop on the deleted path

Fixed background agents crash-looping when the Claude-in-Chrome extension is connected without a shared tab

Fixed clicking links in an attached claude agents session — the background worker's headless browser shim no longer applies while attached

Fixed claude agents "v to open in editor" using the daemon's default editor instead of your shell's $EDITOR/$VISUAL

Fixed claude agents deadlocking on Windows with network-drive working directories; Ctrl+C now works during startup

Fixed background-color bleed when attaching to a claude agents session from Apple Terminal or other 256-color-only terminals

Fixed claude --bg --dangerously-skip-permissions not persisting across retire/wake

Fixed session titles being derived from the URL when the first message is a link

Fixed redundant set_model requests from remote clients injecting duplicate /model breadcrumbs into the transcript

Fixed plugins using skills: ["./"] showing a false "path escapes plugin directory" error

Fixed plugin cache cleanup deleting the active plugin version directory when no installation metadata is present

Fixed /plugin browse pane showing "0 installs" for newly published plugins

Fixed plugin advisories not naming every plugin.json key that shadows a default folder

Improved reactive compaction: the first summarize attempt now seeds from the original request's overflow size, avoiding a wasted near-full-context retry

Improved hook configuration error: configuring a prompt- or agent-type hook for SessionStart/Setup/SubagentStart now shows a clear "use a command-type hook instead" error

Removed stale /model claude-sonnet-4-20250514 suggestion from Usage Policy refusal messages
