]> git.giacomolli.uk - onechat/commit
Give the root agent the schedule tools
authorAnderson A. Giacomolli <redacted>
Mon, 9 Nov 2026 00:29:32 +0000 (21:29 -0300)
committerAnderson A. Giacomolli <redacted>
Mon, 9 Nov 2026 00:29:32 +0000 (21:29 -0300)
commite737005f89c7c663e1636830001730ad79396bdc
tree6bf27e524a9ed074a37591223f1f1c48d25694c0
parent396af2e18eb02d4ec1e35edbc62f01e84bae2b46
Give the root agent the schedule tools

The root agent gets three tools. schedule_set adds a schedule with a
task text and either a local time or a cron expression, and answers with
its ID and next time. schedule_list gives each schedule with its ID,
next time, cron expression or once, and text. schedule_remove removes
one by its ID.

The descriptions tell the agent to set a schedule only when the user
asks, to write the text as an order to itself, and to turn a time such
as "tomorrow at 9" into a local time from the Now line. The cron
description gives the limit of 5 minutes between runs. The prompt text
does not change, so it stays near the reference design.

The daemon opens agent/schedules.json at its start. The toolbox of a
subagent has no schedules, so the tools are unknown there, as the
WhatsApp tools are. Compactions send the new tools too, so they keep the
shared prompt cache.

Issue: 60e4e4f
daemon.go
daemon_start_helper_test.go
prompt.go
prompt_test.go
schedule_helper_test.go [new file with mode: 0644]
schedule_test.go
subagent_run_test.go
tools.go
turn.go
turn_test.go