Background Tasks are a Claude Code feature for running long-lived shell commands — development servers, build tools, watchers, or test runners — without freezing the conversation. Normally a Bash command blocks until it exits, but a backgrounded command runs asynchronously and immediately returns a task ID, so you and Claude can keep working while it stays alive.
There are two ways to background a command: prompt Claude to run it in the background, or press Ctrl+B while a Bash command is running to move it there (tmux users press Ctrl+B twice because of the tmux prefix key). Each task's output is written to a file that Claude can pull in later with the Read tool — to watch a server come up, spot a compile error, or confirm tests finished. This enables a verify-as-you-go loop: start npm run dev, keep editing, and check the live output to confirm changes worked.
Background tasks are cleaned up automatically when Claude Code exits, and a task is terminated if its output grows past about 5GB. To disable the feature entirely, set the CLAUDE_CODE_DISABLE_BACKGROUND_TASKS environment variable to 1. For exact key bindings and current behavior, see the official Claude Code docs, since this area evolves — track changes on the changelog.
Why it matters
Background Tasks unlock the verify-as-you-go loop that makes agentic coding useful: Claude can boot a dev server or watcher once, keep iterating on code, and read live output to confirm a change actually works — instead of repeatedly starting and killing blocking processes or waiting on a single long command.
Deep dive: What Is Claude Code? A Beginner's Guide
Related terms
See Background Tasks in action across releases — browse the Claude Code changelog.
Get release alerts