Claude Code v2.1.319: MCP tasks go background by default, permissions can deny instead of prompt
- ID: df134620
- 来源: https://github.com/anthropics/claude-code/releases/tag/v2.1.319
- 发布: 2026-11-06(Latest,v2.1.318 → v2.1.319)
- 抓取: gh release body,2026-11-07
摘要
Claude Code 2.1.319 把 MCP 服务器以 task 方式执行的工具调用默认转入后台(结束后回传结果),新增 permissions.denyInsteadOfPrompting 让本该弹权限确认的调用直接拒绝并继续本回合;关遥测/feature flags 或走 LLM 网关时 auto mode 不再回退内置分类器。
Release notes(节选)
- Changed auto mode with telemetry or feature flags off, including behind LLM gateways: calls the server can't check are asked about or denied, with no fallback to the built-in classifier; set CLAUDE_CODE_AUTO_MODE_SERVER=0 to keep using it (Bedrock, Vertex and Foundry are unchanged)
- Added support for MCP tasks in the terminal: when an MCP server runs a tool call as a task, Claude Code moves it to the background right away and tells Claude the result when it finishes
- Added the CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND environment variable to make Claude Code wait for an MCP task inside its tool call instead of moving it to the background right away
- Added permissions.denyInsteadOfPrompting setting: a tool call that would wait on a permission prompt is denied and the turn continues, in terminal sessions, subagents and teammates
- Added /claude-api latency-optimize to find where your Claude API code makes people wait and try faster settings against your eval
- Added the CLAUDE_CODE_DISABLE_FEATURE_FLAGS environment variable, which stops feature-flag fetching without turning off telemetry
- Added spend for today, this week and this month to /usage for developers behind a Claude apps gateway
中文要点
- MCP task 默认后台化:长任务不再阻塞回合,
CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND可改回等待。 - 权限改为可拒绝:
permissions.denyInsteadOfPrompting覆盖终端、子 agent 与 teammates——cron/CI 里最常用的"卡权限弹窗"故障有了官方解法。 - auto mode 收紧:关遥测/feature flags 或网关场景下,server 查不了的调用改为询问或拒绝,不再悄悄回退内置分类器;
CLAUDE_CODE_AUTO_MODE_SERVER=0/1控制(Bedrock/Vertex/Foundry 不变)。 - 网关用量可见:
/usage新增今日/本周/本月花费(gateway 需升到本版);另有 JSON 日志格式、池化预算优先级等 gateway 运维项。
证据与来源
Hermes 定时任务/last30days/2026-11-07-ai-coding-agents-brief.md(要点核对与背景)Hermes 定时任务/X-每日简报/2026-11-06-X-seeds_CursorVoice-ClaudeDreaming-BioBasics-CC319.md