human-initiated
chernabog recipes add human-initiatedBakes .chernabog/flows/human-initiated.ts. Its prompt is the SDK’s own unless the repo adds .chernabog/prompts/human-initiated.md.
This is the hybrid path. It runs only when a person names an issue, with chernabog start <issue> (or chernabog run human-initiated --item issue-<n>), whatever its labels. It’s a manual flow: it has no trigger, so it has no schedule and the daemon never ticks it, and Hybrid.itemFor finds the issue named. status shows it as manual (chernabog start <issue>), and giving it a schedule is a config error. A repo baked before it lost its trigger still has trigger: Hybrid.trigger, which keeps working with a schedule that starts nothing; chernabog recipes diff shows the line to remove. It needs Claude under a launcher (orca, tmux or your own); headless, or another agent, fails the run with the reason. It declares start: true, which makes it the flow chernabog start runs; a repo with no flow that declares it, or several, gets an error from chernabog start that names them.
Ends with a green pull request labelled hybrid and a review requested of one reviewer from the pool. review, address-review and re-review take it from there, and a person merges.
Its steps
Section titled “Its steps”Hybrid.claim— the issue’s claim ref, then its branch,auto/issue-<n>(or the one an earlier start left), labelledauto:in-progress, withauto:eligibleandauto:shipremoved. An issue another run holds is left to it; the skip names the run, andchernabog cancel <run>lets the claim go, whether that run is in flight or has ended with its claim ref left behind. The claim goes when the run ends, however it ends; the branch and any pull request stay.prepareWorktree— asimplement’s.Hybrid.workWithPerson— the session with the person, from thehuman-initiatedprompt. When the agent thinks the work is done, it drafts the pull request withchernabog open-pr --draftand asks the person, in a Yes/No question, whether to open it. The session ends on their Yes, which a hook acts on, not the agent; on No they keep working. The person can also runchernabog open-prthemselves. If the person closes the session before that, the run fails and lets the claim go; the issue staysauto:in-progress, andchernabog starton it again picks the session back up.localGate(worktree, { session })— withHybrid.personSession(issue), so a failure’s fix goes back to the person’s session.push(…, { withPerson: true }),Hybrid.openPullRequest— labelledhybrid, neverauto:ship. The person watched the change written, so it pushes even if it toucheshumanOnlyPaths; see Trust. A change to.github/workflows/needs a token with theworkflowscope.waitForCi— red goes back to the person’s session, up tociRounds. Its fixes push the same way.Hybrid.handOff— posts the session marker, comments on the issue, and asks one reviewer from the pool.
Anything that stops it after the session hands the issue to a person with auto:needs-human.
There is one session per repo and issue. chernabog start on an issue whose run is in flight brings up that run’s session. On an issue whose run failed because the session was closed, it starts a new run that takes over the claim and resumes the same Claude session.