Skip to content

Command reference

--bg

Starts the session as a background agent and returns to the shell right away, printing the session ID.

FlagsSession and conversationcurrent

What the documentation does not say

It cannot be combined with -p: one returns immediately, the other waits for the answer. With --exec it runs a shell command as a background job instead of a Claude session.

Also known as
--background