deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Claude Code 2.1.319 adds MCP task backgrounding and a deny-instead-of-prompt permission setting

Claude Code 2.1.319 moves MCP tool calls marked as tasks to the background and adds a setting that denies calls needing approval instead of hanging unattended sessions.

Claude Code 2.1.319 adds MCP task backgrounding and a deny-instead-of-prompt permission setting

What shipped

Claude Code 2.1.319 arrived on November 6, and according to a dev.to write-up covering the release, the changelog's two headline items are MCP task backgrounding in the terminal and a new permissions.denyInsteadOfPrompting setting. The same release bundles 16 improvements and 90 bug fixes, including one where the claude -p command reported success even after its actions had been refused.

How MCP task backgrounding works

Before this release, a slow MCP tool call — a search over a large index, or a third-party API wrapped as an MCP tool — held up the entire Claude Code turn until it returned. Nothing else in the workflow could proceed while that one call was outstanding.

Now, when an MCP server marks a tool call as a task, Claude Code hands it to the background as soon as it starts and reports the result to the model once it finishes. In a workflow touching three MCP servers, the slowest call no longer sets the pace for the faster two.

Two details from the dev.to post are worth noting. First, marking a call as a task is something the MCP server does, not Claude Code — the client only reacts — so users will see no change until the servers they rely on adopt the behavior. Second, there are two escape hatches: CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND restores the old blocking behavior, useful when a workflow depends on strict ordering, while CLAUDE_CODE_DISABLE_MCP_TASKS=1 turns MCP tasks off entirely for cases where a server's task reporting is unreliable. The post also notes that the backgrounding logic does not depend on feature-flag fetching, so it keeps working on Bedrock, Vertex, Foundry or behind an LLM gateway with flags disabled.

A deny setting for unattended runs

The second change is the more consequential one for anyone running agents without supervision, the dev.to author argues. Previously, a tool call that needed approval in a terminal session, a subagent or a teammate context would simply wait indefinitely, turning a scheduled job into a session that burns its time budget accomplishing nothing.

With permissions.denyInsteadOfPrompting enabled, such a call is refused on the spot and the turn moves forward. The job does not get the tool's output, but it does not stall either, and the refusal is visible in the log. The changelog names terminal sessions, subagents and teammates as the places where the setting applies. The author recommends scoping it to scheduled and CI jobs rather than interactive sessions, where seeing and answering prompts is the point.

Exit codes and other fixes

The release pairs the deny setting with an exit-code fix: claude -p in auto mode used to exit 0 even when its actions were refused because no safety check was available, meaning scripts that checked only the exit code would treat a run where nothing happened as a success. Text and JSON output now exit 1 in that situation.

The remaining fixes are unglamorous but practical, per the dev.to post: a diff pane that opened blank after 64 edits in one session, slash commands typed after a leading space being sent as plain text, Monitor's websocket watch failing behind certain proxies, scheduled tasks silently dropping a connector named memory, and background tasks that kept running past /clear disappearing from the task list.

Smaller additions include /claude-api latency-optimize, a command that finds where Claude API code makes people wait and tests faster settings against the user's own eval, and CLAUDE_CODE_DISABLE_FEATURE_FLAGS, which stops feature-flag fetching without touching telemetry. Teams running their own Claude apps gateway also get pooled budget priority rules, a custom sign-in notice and JSON-formatted operational logs.

Why it matters

The two headline features attack the same problem from different angles: an agent that stops making progress because something — a slow tool call or an unanswered permission prompt — blocks the turn. For cron-triggered agents, nightly jobs and CI pipelines, backgrounding keeps work moving while the deny setting converts indefinite hangs into visible refusals, and the exit-code fix lets scripts detect when actions were actually refused. Together they make unattended Claude Code runs surface their failures rather than hiding them behind a silent stall, which for anyone trusting an agent to work without supervision matters more than a new model or interface.

  • #claude-code
  • #anthropic
  • #mcp
  • #cli
  • #developer-tools

Related posts