Answer approvals
Goal: answer a ticket that waits for a person, from the CLI or the web UI.
Prerequisites
afe serverunning, and theafeCLI pointed at it (AFE_API_TOKENexported, and--urlif the server is not on127.0.0.1:8765).- A ticket that waits for a person.
A ticket waits when it pauses. Four things cause a pause:
- a
humannode asks a question. - a budget crossed an alert or a limit.
- a tool call looped.
- a hand-over is needed.
The question and the actions it offers are on the ticket. The actions depend on which of the four caused the pause.
Steps
-
Find the waiting tickets:
afe tickets --state needs_humanafe tickets --state paused_humanafe tickets --state paused_budget -
Read the question and the actions it offers:
afe inspect T-0001 -
Answer from the CLI with one of the offered actions and an optional comment:
afe resume T-0001 approveafe resume T-0001 reject --comment "The intro is too long"afe runasks at the prompt when there is a terminal. Without one, it exits with2and prints theafe resumecommand to use. -
Or answer from the web UI. Start
afe serve -c config/ --uiand sign in. Open Approvals to answer every waiting ticket in place, or open the ticket's page and choose the action there. An action that needs a comment (the node'srequireComment) opens a confirmation whose comment is required.
The actions
| Pause | Actions |
|---|---|
A human node (human_request) | The node's actions (approve, reject, …). A rejection nobody routes asks again with the hand-over actions. |
A budget alert or limit (budget_alert) | continue, extend, stop. extend widens the dimension by half its limit. |
A repeated tool call (loop_detected) | retry, take_over, close. retry resets the count. |
A hand-over (needs_human) | retry, take_over, close. |
take_over stops the node for a person. When you are done, afe resume TICKET with no action
restarts the ticket. See Budgets for extend, and
Git and pull requests for the approval a merge needs.
Troubleshooting
error: action 'stop' is not offered (expected one of [...])
The action you passed to afe resume is not one of the ticket's current actions. Run
afe inspect T-0001 again: the offered actions depend on the pause, and a rejected human node
may switch to the hand-over actions.
error: action 'reject' needs a comment
The node declares requireComment for that action. Pass --comment on the CLI, or fill the
comment field the web UI's confirmation asks for.
afe run exits with 2 and no prompt
There is no terminal to ask at (a script, a CI job, a pipe). Run the printed afe resume command
instead, once you have an answer.