lll Documentation Source
Browse documentation

Ask a person a question and wait for the answer

An agent in the middle of an issue asks a question on that issue and blocks until a person answers. The answer arrives in a shell variable and the agent continues. The person sees which issues wait on them and answers from the CLI or the board.

This is for an agent that reaches a decision it should not make alone, and for the person who owns that decision. Each needs the lll CLI and a token for the board.

The exchange needs lll command
A name for the agent lll bot create bot-NAME --env
Ask and block for the answer lll issue ask KEY "..." --wait DURATION
Address the ask to one member --for NAME
See what waits on a person lll issue list --needs-human
Read the question lll issue view KEY, lll issue ask KEY
Answer lll issue answer KEY "...", or the form on the issue page
Wait again after a timeout lll issue ask KEY --wait DURATION

Before you start

  • A board both sides can reach, and a team they can write to. See Set up a board.
  • A build of lll that has asks, on the server and on both machines. The changelog lists asks under Unreleased, after 1.9.0. The build used here reports lll 1.9.0 and was made from main at 94ef763. If lll issue ask --help fails, the build is too old.

In this example, bot-migrator works on SCRAT-1, “Rename orders.total to orders.total_cents”. The person is the member scratch.

1. Give the agent its own bot member and an issue

The person runs these. The second command creates the example’s issue, which gets the key SCRAT-1 on a new board.

lll bot create bot-migrator --env > migrator.env
lll issue create "Rename orders.total to orders.total_cents"

The file exports LLL_URL and LLL_TOKEN for the bot. The agent loads it in its own shell, sets the team and claims the issue.

. ./migrator.env
export LLL_TEAM=SCRAT
lll issue claim SCRAT-1

The agent needs its own member so the person’s answer comes from someone else. lll refuses an answer from the same member under the same agent label as the ask; see Limits for what that refusal does not cover.

2. Ask and wait

The agent runs this and captures stdout only.

answer=$(lll issue ask SCRAT-1 "Rename orders.total in place, or add total_cents and backfill?" --for scratch --wait 5s)
echo "exit $?"

With --wait, stdout carries the answer text and nothing else. Status lines go to stderr. Exit 0 means answer holds the answer. Exit 5 means the wait ended with no answer and answer is empty.

--wait takes a duration with a unit: 30s, 10m, 1h. This run used 5s to show the timeout. Use a duration that matches how fast the person replies.

--for scratch records who the ask is for. It does not restrict who can answer; see Limits. Omit it to ask anyone. -b - reads the question from stdin, which suits a long question or one with quotes.

3. See what waits on you

The person runs these as themselves.

lll issue list --needs-human
lll issue view SCRAT-1

The list holds every issue with an open ask, in any state. The view prints a Needs human block with each open ask: its ID, who asked, who it is for and the question. lll issue ask SCRAT-1, with no question, lists the issue’s asks, including answered ones.

On the board, the card shows a Needs human badge with the question as its tooltip. The issue page has a Needs a human section with the question, a text area and an Answer button.

4. Answer

lll issue answer SCRAT-1 "Add total_cents and backfill. Keep total until the March release."

The answer closes the ask. The issue leaves the --needs-human list when its last open ask closes. If the issue has more than one open ask, the command exits 4 and prints each ask’s ID; pass one with --ask ID.

5. Wait again after a timeout

After exit 5 the ask stays open. The agent waits on it again with no question.

answer=$(lll issue ask SCRAT-1 --wait 2m)

The command returns at once if the answer arrived in the meantime. Without a question it never opens a second ask. It waits on the issue’s oldest open ask, so keep one open ask per issue when you retry this way; see Limits.

6. Finish the issue

lll issue close SCRAT-1

lll refuses to move an issue to done or cancelled while an ask is open, with exit 4. Once every ask has an answer, the close succeeds. Other state changes are allowed during the wait; --state in-review succeeded with the ask open.

What the commands print

The scratch board ran lll 1.9.0, built from main, on 2026-11-30. bot$ marks the agent’s shell and $ the person’s.

The step 2 wait timed out. The message went to stderr and answer was empty.

bot$ answer=$(lll issue ask SCRAT-1 "Rename orders.total in place, or add total_cents and backfill?" --for scratch --wait 5s)
Nothing to do: no answer to ask ewhj4jcidzkij4q on SCRAT-1 (waited 5s); it stays open: 'lll issue ask SCRAT-1 --wait 5s' waits again
bot$ echo "exit $?"
exit 5

The person saw the issue and the question.

$ lll issue list --needs-human
SCRAT-1  ○ todo    Rename orders.total to orders.total_cents  bot-migrator, claimed just now  just now

$ lll issue view SCRAT-1
...
Claimed:   bot-migrator (just now)
Needs human: 1 open ask(s); 'lll issue answer SCRAT-1 "..."' answers
  ewhj4jcidzkij4q by bot-migrator for scratch (just now): Rename orders.total in place, or add total_cents and backfill?

Before the answer, the agent tried to answer its own ask and to close the issue. Both exited 4.

bot$ lll issue answer SCRAT-1 "In place"
Error: SCRAT-1: You opened this ask, so you cannot answer it: someone else has to, another member or another session of this member under its own agent label.

bot$ lll issue close SCRAT-1
Error: SCRAT-1: This issue has an open ask: "Rename orders.total in place, or add total_cents and backfill?"; answer first, or explicitly force the move to done; ...

The step 5 wait ran in the background. The person answered and the wait exited 0 within three seconds, with Answered by scratch on stderr.

$ lll issue answer SCRAT-1 "Add total_cents and backfill. Keep total until the March release."
Answered ask ewhj4jcidzkij4q on SCRAT-1 as scratch

bot$ echo "exit $? answer=$answer"
exit 0 answer=Add total_cents and backfill. Keep total until the March release.

$ lll issue list --needs-human
no issues

After a second ask got its answer, the agent closed the issue.

bot$ lll issue close SCRAT-1
Closed SCRAT-1 ● done
Released bot-migrator's claim; assignee unchanged.

Limits

  • Verified: every command on this page, against a scratch board, with one person and two bot members on one machine. The board’s badge and answer form were confirmed in the HTML of the team page and the issue page, fetched with curl. Not verified: submitting the form. No browser was used, and a curl POST to /answer was refused with 403 because the board accepts changes only from its own pages. Also not verified: a real agent driving the wait, and a wait longer than two minutes.
  • --for NAME does not restrict who can answer. bot-reviewer answered an ask that was for scratch, and the command exited 0. An unknown name exits 3 with no member named 'nobody'.
  • The own-ask refusal covers the same member under the same agent label only. bot-migrator asked with --agent migrate-1, then answered with no --agent, and the command exited 0. It also asked with no label and answered with --agent other-1, and that exited 0. Do not rely on the refusal to keep an agent from answering itself.
  • lll issue view shows open asks only. After the answer, read the question and answer with lll issue ask KEY.
  • A wait with no question does not know which ask is yours. With two open asks it waited on the older one. With no open ask, lll issue ask KEY --wait 3s printed the most recent answered ask’s answer and exited 0. On an issue with no asks at all it exited 3. Keep one open ask per issue, and keep the answer from the wait that followed your question.
  • --force --reason "why" on lll issue close or lll issue update --state moves the issue past an open ask and closes the ask unanswered. A wait on that ask then exits 4 with an empty stdout. --force without --reason exits 4. Treat exit 4 from a wait as “no answer will come”.
  • --wait 5, with no unit, exits 2 before asking.
  • Claiming an issue does not change its state. SCRAT-1 stayed in todo while bot-migrator held the claim and waited.