Agents that drive Cohort
Every agent Cohort runs gets Cohort’s own tools: an MCP server (cohort mcp) and the cohort command line. With them an agent can split its task across other agents, wait for them, land their work on its own branch, and stop to ask you something. You don’t set anything up: ask in plain words.
Split this into three parts and give each one to a child thread. Merge them into your branch when they’re done.
The full list of tools and their arguments is in MCP tools.
Child threads
Section titled “Child threads”An agent starts a child with start_thread: another agent on its own task, in its own worktree and branch. By default the child:
- starts from the parent’s branch, and its work lands back on the parent’s branch;
- runs the same agent, model and login as the parent, in the same project;
- gets the parent’s permission mode, or a lower one if the parent asks. Never a higher one.
The parent can ask for a different agent or model (a Codex child under a Claude Code parent), another project (a shared library the project uses), a project’s login for that work, or another of your machines (see Servers).
In the parent’s thread a Started child thread row links to the child, and the child shows under its parent in the thread list. Open it to watch or steer it like any thread. More in Child threads.
Waiting, steering, stopping
Section titled “Waiting, steering, stopping”wait_for_threadswaits until its children are done, failed or stopped, then hands the parent each one’s status and last message.get_threadandlist_threadscheck on them: status, branch, last message, the files they changed.send_messagesteers a child’s running turn or queues a message for after it.stop_threadstops one.
When a child finishes, its parent hears about it: a Child thread done (or failed, or stopped) row with the child’s last message.
Merging a child
Section titled “Merging a child”merge_thread lands a child’s work on its target, the parent’s branch by default, the same way Merge does for you: it lands only once the project’s checks pass, and shows up in the parent’s folder too. The parent waits until it has landed or failed. See Merging.
Asking you
Section titled “Asking you”ask_userputs a Question card in Needs you, with suggested answers when the agent gives some. The agent waits for your answer.report_progressposts a short note on the thread, for you to read later. It doesn’t stop the agent.
Secrets
Section titled “Secrets”An agent that needs an API key asks with request_secret. You get a Secret card in Needs you: “The agent asks for OPENAI_API_KEY”, why it needs it, and where it goes (a .env file in the thread’s folder, kept out of git, or the project’s secrets). Type the value and Save, or Cancel.
The agent never sees the value. It learns only whether you saved it, cancelled or didn’t answer in time.
From a terminal: cohort secret provide answers a request (it reads the value without showing it), cohort secret cancel turns it down.
Timers and reminders
Section titled “Timers and reminders”wake wakes the agent’s own thread once, later, with a prompt: “check back in 10 minutes”, “look at the deploy at 18:00”. It shows in Loops until it fires. If the thread is busy then, the prompt waits for its turn to end.
Agents can also create and run loops (create_loop, run_loop, list_loops).
Moving its own thread
Section titled “Moving its own thread”When you ask, an agent can move its own thread: move_to_worktree (from the project’s checkout into a new worktree of its own), move_to_folder (another folder of the project), move_to_project (another project). The move happens when its turn ends. archive_self archives its thread once the turn ends.
The same from a shell
Section titled “The same from a shell”Everything above has a cohort command, for agents that prefer a shell or scripts of your own:
cohort thread start "Add rate limiting to the API" --project api --followcohort thread listcohort thread send thr_… "Use the existing middleware"cohort thread merge thr_… --waitcohort secret request OPENAI_API_KEY --reason "To run the embedding tests"cohort wake 10m "Check whether CI passed"--follow prints the transcript as the turn goes and exits when it ends: 0 done, 1 failed, stopped or gone, 3 waiting on you. See the CLI reference.
Use Cohort from another harness
Section titled “Use Cohort from another harness”cohort mcp is an ordinary MCP server, so an agent you run yourself, outside Cohort, can use it too: Claude Code in your terminal, Cursor, anything that speaks MCP. Cohort must be running (the app, or the daemon on its own) and cohort must be on your PATH.
Claude Code:
claude mcp add cohort -- cohort mcpCursor: add it to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project):
{ "mcpServers": { "cohort": { "command": "cohort", "args": ["mcp"] } }}An agent outside Cohort isn’t a thread, so it has no children of its own. It can:
- start threads with
start_thread. They are top-level threads in Cohort, listed and merged like ones you start; - check on them with
get_threadandlist_threads(which lists every thread), and wait for the ones it names withwait_for_threads; - list and run loops, list your machines, and share a port.
The tools that act for a calling thread (send_message, stop_thread, merge_thread, ask_user, request_secret, report_progress, wake, the moves) say they need one. Steer, stop and merge those threads from Cohort, or with cohort thread send, cohort thread stop and cohort thread merge.
