KB / Memory / reference-herdr-child-dispatch-verify
Herdr child agents — a long prompt can fail to submit and look exactly like an idle child
herdr agent prompt with a long brief lands unsent in the opencode composer; verify the lifecycle moved instead of trusting the CLI's success response
A herdr agent prompt carrying a long brief (~150+ lines) can be delivered to an
opencode child's TUI as a bracketed paste that is never submitted. The
composer sits there showing [Pasted ~158 lines], the agent stays idle, and
agent prompt still returns {"type":"agent_prompted"} with no error.
Short prompts of the same shape submit normally. Observed 2026-09-28 managing docker-images worktree children.
The failure is silent because idle is ambiguous: it is the state of a child
that was never addressed and of one that is thinking, or done, or waiting its
turn. A manager's notes saying "Dispatched" plus a live worktree plus an idle
agent all look identical to a healthy run.
Why: a whole run can be lost without a single error. In that run the entire tick reduced to one changed line, so the loss was total and the checklist still read "Dispatched" with every box unticked.
How to apply:
- Put the brief in a file in the run directory (
brief-<child>.mdnext toqueue.md); prompt with one or two sentences plus the absolute path. Short prompts don't stall, and a file brief makes a re-prompt one line. - After prompting, confirm the lifecycle actually moved:
herdr agent get <name>must showworkingand a bumpedrevisionwithin seconds. Unchangedrevisionmeans the prompt did not land. herdr pane read <pane> --source visibleshows an unsent paste immediately.- Clear a stuck composer with
herdr agent send-keys <agent> ctrl+ubefore re-prompting, so the next submit does not concatenate with the dead paste. - Related: a server restart can kill a child's shell tool mid-turn. Its staged
work survives — check
git statusin its worktree before assuming a loss, then re-prompt; staged work only needsgit commitand a push.