Skip to content
BENIBIX Learn

CLAUDE_CODE_DISABLE_BACKGROUND_TASKS

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1

Set to 1, it keeps each command and helper in front.

Think of it like

It is like you ask a helper to finish one job. Then they start the next.

Example

Lucy's CI logs got confusing when jobs ran in the back. She sets this, and every step now finishes in order.

Why it matters

Jobs in the back are fast but hard to follow. In some places, order matters more.

Definition

CLAUDE_CODE_DISABLE_BACKGROUND_TASKS set to 1 stops Claude from running shell commands and subagents in the back. Ctrl+B stops working, and slow jobs are no longer moved to the back on their own. MCP tasks and the Monitor tool still run in the back. Background sessions have their own switch.

Example code

bash
export CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1
claude
Run every job in front, one at a time.

Common mistake

Expecting it to stop background sessions too. Those have their own switch.

Key takeaways

  1. 1
    No background shells. Or subagents.
  2. 2
    No Ctrl+B. When set.
  3. 3
    MCP tasks still run. In the back.