Configuration
Stop labels
A stop label pauses all work on an issue or pull request until a person removes it. The default is needs-human. Agents never set workflow labels themselves; the launcher applies them from the reported outcome.
Adding a stop label also stops a running agent at the next lease renewal check, within lease-renew-minutes (10 minutes by default). The launcher discards any early report, leaves labels unchanged and does not count the stop as a failed attempt. Its output and run record name the stop label.
Closing the issue, closing the pull request without merging, or someone else merging the pull request also stops the agent, even with stop-labels: []. If the run stored a report before the process stopped, the launcher settles it through the same validation and outcome transitions as a normal exit. A rejected report gets the same result as after a normal exit. The report stays recoverable if the launcher is interrupted before release. Without a stored report, the run is recorded as blocked, with no failed attempt or Action needed notice.
A run that merges its own pull request keeps running to finish its post-merge work and report. The merge must be by the launcher's GitHub account, from the assigned head or the run's base merges on it. The lease, ownership checks and agent timeout still apply. A stop label still stops the run and discards its report after this merge.
If that run ends without an accepted report, the launcher records blocked and posts an Action needed notice that post-merge work may be unfinished. This includes timeouts, crashes, rejected reports, lost ownership and launcher interruptions. A restarted launcher preserves the warning and can settle a stored report without rerunning the agent.
The check covers setup from the claim until the agent process exits. A label removed or an item reopened before the check has no effect. Once the process exits, the normal outcome transition checks apply instead of cancelling the run.
stop-labels: [needs-human]
How an agent stops
Give the role an outcome that adds the stop label, and say in its instructions when to use it.
implementer:
outcomes:
handed-off: {add: [needs-review]}
needs-human: {add: [needs-human]}
The agent reports that outcome with at least one ask. The launcher adds the label and posts an Action needed comment that lists each ask.
$ ub-agents report --outcome needs-human --summary "Storage policy unclear" \
--option "Owner: keep storage local." --option "Owner: move storage to the cloud."If the outcome adds a stop label, --handoff PR_NUMBER may name a draft PR. The launcher puts the stop label and notice on that PR and leaves it draft. Other validation still applies. If the report is rejected, its notice keeps the asks and summary alongside the rejection reason.
Say when a person decides
The agent stops only where its instructions tell it to. Name the decisions that belong to a person, and who answers them, in the shared policy:
## Human decisions
@acme/maintainers answers scope and policy questions. Stop and ask before you:
- change a public API, a database schema or a dependency
- delete data or change permissions
- choose between designs the issue leaves open
Then say in each role file what that means for the role:
If the issue does not name the storage backend, or the change needs a
migration, report needs-human with one --action per decision.
Resuming
Answer the asks on GitHub, remove the stop label and add the trigger label you want. A blocked run adds no label; once the blocker is fixed, run ub-agents retry or push a new commit to the pull request.
Use ub-agents retry to resume an item stopped during execution; it removes the stop label and restores the selected agent's trigger. Stopping for closure without a stored report needs no further action and posts no Action needed notice. To resume work on a closed item, reopen it before retrying. If a run merged its own PR and left an unfinished-work notice, review and complete the remaining work before deciding the next role or handoff.
$ ub-agents retry 214 --reason "Chose local storage"With approvals on, ub-agents also adds the stop label when an item needs a maintainer, with a comment saying what to do.
The ub-agents-unblock skill walks your own agent through every item waiting for a person.
Rules
An outcome may add a stop label but never remove one. ub-agents doctor --offline rejects it.
Key reference
stop-labels accepts a label string or a list of labels; the default is [needs-human]. Use [] to configure none. See claim election for cancellation checks and explicit outcomes for stops during transitions.