]> git.giacomolli.uk - onechat/commit
Send messages to subagents with tell
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Sun, 8 Nov 2026 13:48:37 +0000 (10:48 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Sun, 8 Nov 2026 13:48:37 +0000 (10:48 -0300)
commite1e48ba388c28105fff3b70c8ca02304f5d57f53
treefd5580b14dd63b54e42fce42ca84c9dc1a4642b7
parentddd0a50f7b801112376d7fb27bfd05d2fc26c2fd
Send messages to subagents with tell

The agent gets the tell tool: tell(name, message) logs the message as a
user message of the subagent. A running subagent reads it between its
tool calls, and when it comes after a final answer, the run goes on with
one more request chain that reads the log again. The report of the run
then holds the final answer of each chain. A finished subagent goes on
from its log with a new run, with the view of now and the effort of the
note at the start of its log, and its reply comes back as a new report.

The log holds every message of a tell, so a told subagent needs no state
outside its log, and a restart can resume it in the same way.

Issue: b1ac698
README.rst
prompt.go
prompt_test.go
subagent.go
subagent_run.go
subagent_run_test.go
tools.go