Background tasks
An agent can start a long command (a test suite, a build, a dev server) and leave it running in the background while it finishes its turn. When the command ends, the agent wakes and takes a turn of its own to deal with the result. Claude Code does this; other agents don’t yet.
While a task runs, the thread is Background (“Background, 1 task”): it still counts as working, never “Done”, and it waits on the task rather than on you.
Watch a task
Section titled “Watch a task”Each running task is a chip above the composer: what it is and how long it has run (“Running tests 4m 12s”). Click it to see the last lines of its output, updated as it runs, with:
- Open log: its whole output file, in the side panel.
- Stop: ends its process, after a confirm. What it printed so far stays in its log.
The transcript says when one starts (“Running in the background: …”) and ends (“Background task finished: Running tests (exit 0, 11m)”).
When it ends
Section titled “When it ends”- Finished or failed: the agent wakes and reacts, as a new turn. Then the thread is done (or Background again, if it started another).
- Stopped by you: the thread is done.
- The agent’s process ended (you stopped the agent, archived the thread, changed its login, or Cohort restarted): the task ends with it (“Background task ended with the agent’s process”). After a restart the agent is told its tasks ended.
You can message the thread while tasks run. That’s an ordinary turn; afterwards the thread is Background again.
Merging while tasks run
Section titled “Merging while tasks run”Merge asks first (“1 background task still running: … Merge anyway?”), since a running test is often what tells you the work is ready. Usually, wait for it.
From the CLI
Section titled “From the CLI”cohort thread tasks <id> # what runs in the backgroundcohort thread tasks <id> --output <task> # the end of its outputcohort thread tasks <id> --stop <task>