Skip to content
CohortDocs

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.

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)”).

  • 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.

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.

Terminal window
cohort thread tasks <id> # what runs in the background
cohort thread tasks <id> --output <task> # the end of its output
cohort thread tasks <id> --stop <task>
Made by Bussin Bytes© 2026 Bussin Bytes Ltdcohort.bussinbytes.io