Command reference ยท Claude Code
/background
Detaches the current session from the terminal and lets it keep running as a background agent, freeing up the terminal.
Detaches the current session from the terminal and lets it keep running as a background agent, freeing up the terminal. With a prompt argument, one final instruction is sent before detaching. Monitor via 'claude agents'. Alias: /bg.
โ WHEN TO USE IT?
Free up the terminal while the session keeps running in the background
/background
Give one last instruction before detaching
/background run the tests one more time before you go
โ WHEN NOT TO?
Want to watch the result synchronously
/background detaches the session from the terminal right now - if you want to see the answer directly, detaching offers no benefit.
Better: just wait in the running session
Side task with inherited context in parallel with the main session
/background detaches the entire session, not just a sub-task.
Better: /fork
SOURCES
- Claude Code Doku (offiziell) โ code.claude.com