Auto-background long-running MCP tool calls
Feature Request
Problem
When using MCP tools that take a while to complete (e.g., mcp__codex__codex for code review), Claude Code shows a "Ctrl+B to run in background" prompt. In automated/orchestrated workflows (like multi-agent pipelines), this creates an unnecessary manual step — the user always wants these calls to run in the background.
Proposed Solution
Add an auto_background list to .claude/settings.local.json (or project settings.json) that specifies tools which should automatically run in the background:
{
"permissions": {
"allow": ["mcp__codex__codex", "mcp__codex__codex-reply"]
},
"auto_background": [
"mcp__codex__codex",
"mcp__codex__codex-reply"
]
}
When a tool in this list is invoked, it would automatically background without showing the Ctrl+B prompt.
Use Case
Multi-agent orchestration where Claude Code calls out to external LLM reviewers (via MCP) as part of a larger workflow. The MCP calls routinely take 30-60+ seconds, and the user always wants them backgrounded. Having to press Ctrl+B each time adds friction to an otherwise automated pipeline.
Alternatives Considered
- Hooks: PreToolUse hooks can't control the UI backgrounding behavior
- Wrapping MCP in a bash call: loses structured output and MCP benefits
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗