Oban worker in the :subagents queue: runs one child conversation for delegate_subagent.
The plugin creates the child conversation and its pi.subagent task, then enqueues this job. Any
node can run it, so the queue limit (config :super_pi, Oban, queues: [subagents: n]) bounds the
children of the whole cluster. The job:
- claims the task (
pendingtorunning). A task that was aborted while it waited is skipped. - starts the child's machine and submits the prompt. The machine is unique in the cluster, so it may run on another node than this job.
- settles the task with the final text (
complete_task/2) or the error (fail_task/2). That wakes the parent, whose machine is parked in:awaiting_children.
max_attempts: 1: an LLM turn can have side effects (a worker edits files), so a retry could
repeat them. A job lost with its node is not retried. The child's machine is restarted by Horde,
resumes the turn from the durable state and settles the task itself (settle/2, called from
the machine when the turn of a child conversation ends). If only the machine is lost, this job
starts it again and waits for the task to settle.
Test hook: config :super_pi, :subagent_machine_opts is merged into the child machine's
options (an llm_responder, say). A job argument cannot carry a function.
Summary
Functions
The text of an assistant message.
Machine options of a child with this role: its extensions, plus the test hook.
Records how the child ended on its pi.subagent task, once. Called by this worker and by the
child's machine when its turn ends, whichever comes first; the later call changes nothing. The
event subagent_finished is published by the call that settles the task.
Functions
The text of an assistant message.
Machine options of a child with this role: its extensions, plus the test hook.
Records how the child ended on its pi.subagent task, once. Called by this worker and by the
child's machine when its turn ends, whichever comes first; the later call changes nothing. The
event subagent_finished is published by the call that settles the task.