From: Anderson A. Giacomolli Date: Sun, 8 Nov 2026 13:33:12 +0000 (-0300) Subject: Run subagents in the background with spawn X-Git-Url: http://git.giacomolli.uk/onechat/commitdiff_plain/ddd0a50f7b801112376d7fb27bfd05d2fc26c2fd?hp=ddd0a50f7b801112376d7fb27bfd05d2fc26c2fd Run subagents in the background with spawn The agent gets the spawn tool: spawn(tasks, effort) starts one subagent for each task and returns their names at once. It waits until the view has no pending summary, and gives that view to each subagent. Each subagent runs in its own goroutine with its own request chain, its own system prompt with the user's instructions at the end, and the tools zoom, date, shell, read, write, and edit, in subagents/NAME/work. It cannot start a subagent. Each request starts with the view, the state, and the whole log of the subagent as "i|kind: text" lines, and the log starts with the note "subagent" and the task. At the end of a run, its final answer, or "failed: ERROR" after a failed call such as a full context, goes to the agent as one work message: "[Name]", the reply, and the zoom that gives its whole chat. The report joins a running turn between its tool calls, or starts a new turn. A report of a stopped subagent is logged but starts no turn. When the loop ends at the stop of the daemon, the runs end with no report, and the loop waits for them. The prompt gets the lines on subagents. The efforts of spawn are low, medium, high, and xhigh: the efforts of the reference design that the Responses API also takes. Issue: b1ac698 ---