Claude Code can run a session in the background, so it keeps working after you close the terminal. Most people leave a window open and watch. Here is how to start one, find it again, and what to watch out for.
Step 1: start a background session
- In your terminal, run: claude --bg "fix the failing tests"
- Add a name if you want one: claude --bg --name "flaky-test-fix" "fix the failing tests"
- Already in a session? Type /bg (or /background) to move the conversation into the background. You can add a prompt: /bg run the test suite.
- Close the terminal. A separate supervisor process keeps the session running.
Keep reading
Free, for an email.
Unlocks 3 more sections, 1 copy-paste prompt, the document version, and every other guide on the site, for free. Enter your email once to keep reading.
45,000+ follow where these guides come from.No spam. Unsubscribe in one click.