Claude starts a test suite or a dev server and the session just sits there waiting. You don’t have to.
While a Bash command is running in the foreground, press:
Ctrl+B
The command keeps running, but in the background. Claude Code gives it a task ID, writes its output to a file, and you can send the next prompt right away. Claude reads the output file when it needs the result. /tasks shows what is still running and lets you stop it.
You can also just ask: “start the dev server in the background”. And a command that hits its timeout is moved to the background automatically instead of being killed, unless it starts with sleep.
Inside tmux, Ctrl+B is tmux’s prefix key, so press it twice. I can see that one tripping people up, because the first press seems to do nothing.
Background tasks end when Claude Code exits. That’s good for a dev server you forgot about, less good if you expected a long build to finish on its own. If you need that, run it in a separate terminal. A task whose output passes 5 GB is stopped, which a chatty watch process can reach faster than you’d think.
Further reading: Background Bash commands