team-harness

Coordinator Tools

On every turn the coordinator sends its full toolset to the model and dispatches whatever the model calls by name through the tool registry. The coordinator uses these tools to delegate and to inspect the workspace — it does not implement changes itself; that is the workers' job.

Agent management

Spawn and manage worker subprocesses.

ToolPurpose
spawn_agentStart a worker of a given agent type on a task
kill_agentTerminate a running worker
agent_statusInspect one worker's state
list_agentsList all workers and their states
wait_for_agentsBlock until specified workers finish
wait_for_anyReturn as soon as any specified worker finishes
read_agent_outputRead a worker's output so far
read_new_agent_outputRead only worker output produced since the last read

spawn_agent accepts the agent type, the task prompt, and optional overrides such as model, flags, and a worker_label. Every configured agent type — built-in or custom — appears automatically as a spawnable type (see Workers).

On success, spawn_agent returns a bare agent_<id> string. When an active hard-rate-limit circuit blocks the requested family, it instead returns a JSON object with spawned: false and status: "rate_limited"; no worker is created. Programmatic callers can use the exported Python helper team_harness.parse_rate_limited_spawn_result as a strict guard for this rate-limit branch.

File system

Read and edit files. Paths may be relative or absolute — the file tools are not sandboxed to the working directory; access is limited only by the harness process's own permissions (see the trust model).

ToolPurpose
read_fileRead one bounded page of a file (also used for skills)
write_fileWrite a new file or overwrite an existing one
append_fileAppend to a file
edit_fileReplace a string in a file
multi_edit_fileApply multiple edits to one file
lsList a directory
globMatch files by glob pattern
grepSearch file contents
read_new_file_contentRead one bounded FIFO page produced since a prior read

Both file-content readers return small reads unchanged and cap each larger result at 32,768 characters and 32 KiB after UTF-8 encoding, plus short pagination metadata. A paged read_file result includes its exact character range, end-of-file status, and next offset_chars; request another page with named offset_chars and an optional smaller named limit_chars. read_new_file_content keeps an isolated FIFO cursor per run and tells the coordinator to call again with the same path while unread backlog remains. The fixed maxima prevent one file read from consuming the remaining coordinator context. For a large structured artifact, the coordinator may instead choose a focused jq projection through bash.

Shell

ToolPurpose
bashRun a foreground shell command (unsandboxed, stdin=/dev/null)

bash defaults to a 120-second whole-command deadline. For a known long-running batch, the coordinator can pass a positive named timeout_seconds value sized for the complete foreground operation. That outer deadline is separate from any per-item timeout flag understood by the command itself. Timeout or tool cancellation terminates and reaps the command's whole process group, including descendants; a timeout reports interruption, not semantic failure of the command's task.

Task tracking

ToolPurpose
todo_writeWrite / update the persistent task list
todo_readRead the current task list

The task list is persisted per run as todo.json — see Run Logs.