Claude Code

Keep Claude Working After You Close the Terminal

One flag starts a Claude session that keeps running with no terminal open. How to start it, list every session, reopen one by part of its name, read what it did, and the two catches

2min read
1prompts to copy
4numbered steps
4sections

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

  1. In your terminal, run: claude --bg "fix the failing tests"
  2. Add a name if you want one: claude --bg --name "flaky-test-fix" "fix the failing tests"
  3. 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.
  4. 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.

Read next