wait
Declare what a session waits for, and until when. A session uses it when it waits on something that is not a person: CI, another session, a build it started.
bash
the-loop wait --work-item github:OWNER/REPO#N --for "CI on PR 12" --until 30mWhat it does
- Records the wait as a
session.wait_declaredevent with the condition and the time the wait ends. - Lets the turn end. The Stop gate allows the one stop that ends the turn the wait was made in, with the reason
declared-wait(issue-551). - Prints when the wait ends, and that it covers only this turn's stop.
When the wait ends, the session is idle from that moment, and the idle watcher treats it as any idle session.
A wait covers one stop. If a new turn starts and the session still waits, it declares the wait again. One wait cannot excuse every later stop until it ends.
Flags
| Flag | Default | Meaning |
|---|---|---|
--work-item | required | The session's own work item: github:… or jira:<site>/<KEY>-<n>. |
--for | required | What the session waits for, in a few words. At most 200 characters. Recorded as one line of printable characters and shown on the status surfaces only; it is posted to no channel. |
--until | required | How long the wait lasts: a whole number and one unit, as in 45s, 30m or 2h. |
What it refuses
Each refusal exits non-zero, says why, and records nothing.
- A duration over the operator's wait limit,
routing.watchdog.maxWaitSeconds(default 3600 seconds). - Text that is not a duration, such as
30orsoon. - An empty condition, or one over 200 characters.
- A work item whose pointer is on a human-owned node. the-loop already waits for a person there. Use
askto ask a question. - A work item that is not the session's own: a ref other than
THE_LOOP_WORK_ITEMwhere that variable is set (exit 2), or a ref with no live session in the registry. - A shell that carries the daemon's instance variable (
THE_LOOP_INSTANCE) and noTHE_LOOP_WORK_ITEM(exit 2). The session lost the name of its work item, so no ref can be checked against it.
The last two bind a session to its work item and authenticate nobody. What they do not guarantee is in process-graph.