Hand an issue back instead of guessing
A worker that has claimed an issue and cannot finish it honestly returns it to
the queue with a record of why. The issue says what was tried and what is
missing. A person can find it with one list filter, and the next worker’s
lll issue next does not pick it up again until the missing piece arrives.
This is for agents that take work from a board unattended, and for the people
who run them. lll skill get backlog-loop states the rule the commands serve.
| A hand-back needs | lll command |
|---|---|
| What was tried and what is needed | lll issue comment KEY -b "..." |
| A question a person must answer | lll issue ask KEY "..." |
| The state returned, and a mark that keeps it out of the queue | lll issue update KEY --state todo --add-label handed-back |
| The claim freed | lll issue release KEY |
| Take work, skipping handed-back issues | lll issue next --claim --exclude-label handed-back |
| Find issues waiting on a person | lll issue list --needs-human |
| Find every handed-back issue | lll issue list --label handed-back |
| Hand back for missing work, not a decision | lll issue block KEY BLOCKER |
| Record the outcome when it finally closes | lll issue update KEY --add-label outcome:changed |
Before you start
- A board and a team the workers can write to. See Set up a board.
The steps below ran top to bottom on a new board whose team is
SCRAT. - A build that has asks, for steps 2, 4 and 5 (
lll issue ask,lll issue answer,--needs-human). Asks are unreleased as of 2026-11-30. They are in main at commit 94ef763 and are not in released 1.9.0. The other commands ran on that same build. The page did not test released 1.9.0. - Two labels and two bot members, created by the person who owns the board:
lll label create handed-back
lll label create outcome:changed
lll bot create bot-importer --env > importer.env
lll bot create bot-second --env > second.env
Each step says who runs it. To act as a bot, load its file in a shell:
. ./importer.env; export LLL_TEAM=SCRAT. To act as the person again, open
another shell or run unset LLL_URL LLL_TOKEN.
1. Set up the example
As the person:
lll issue create "Import customers from the legacy CSV export" --priority high -b "Load exports/customers-2019.csv into the customers table. Acceptance: row count in the table equals row count in the file."
lll issue create "Add a --dry-run flag to the importer" --priority low -b "Print what would be written and exit 0 without writing."
As bot-importer:
lll issue next --claim --exclude-label handed-back
lll issue start SCRAT-1
bot-importer now holds SCRAT-1. SCRAT-2 stays in todo, unclaimed, for
the whole flow. The file has 41 rows that share an email with another row,
and the issue does not say what to do with them.
2. Hand the issue back
As bot-importer:
lll issue comment SCRAT-1 -b "Handing back. Tried: loaded exports/customers-2019.csv into a scratch table. 4,112 rows in the file, 4,071 distinct emails; 41 rows share an email with another row and customers.email is unique. Not done: nothing written to customers. Needed: a decision on the 41 duplicates (keep newest, keep oldest, or reject the file). Next action once decided: rerun the import with that rule and compare row counts."
lll issue ask SCRAT-1 "41 rows share an email with another row. Keep the newest row per email, keep the oldest, or reject the file?"
lll issue update SCRAT-1 --state todo --add-label handed-back
lll issue release SCRAT-1
Write the comment for a reader who has not seen your session. Give the evidence you ran, what you did not do, what is missing, and the next action.
The ask is the question a person has to answer. While it is open, the issue
appears in lll issue list --needs-human. Skip it when no person has to
decide anything. Step 6 covers that case.
Use --add-label. --label replaces every label the issue carries. Do not
skip the update: the release does not change the state, and the open ask does
not keep the issue out of the queue. The label, with the exclusion in step 3,
does.
3. Take work without picking up the handed-back issue
As bot-second:
lll issue next
lll issue next --exclude-label handed-back
The first command prints SCRAT-1, the issue that was handed back. The second
prints SCRAT-2. Neither has --claim, so nothing changes. A working loop
adds --claim to the second form.
4. Find the issue, answer, and put it back in the queue
As the person:
lll issue list --needs-human
lll issue list --label handed-back
lll issue ask SCRAT-1
lll issue answer SCRAT-1 "Keep the newest row per email. Log the 41 dropped rows to exports/dropped.csv."
lll issue update SCRAT-1 --remove-label handed-back
The first list shows issues with an open ask. The second shows every issue
that carries the label, with or without an ask. lll issue ask KEY prints the
question. Removing the label puts the issue back in the queue.
5. Pick the issue up and read the answer
As bot-second:
lll issue next --claim --exclude-label handed-back
lll issue ask SCRAT-1
The claim prints SCRAT-1 on stdout and Claimed SCRAT-1 for bot-second on
stderr, so key=$(lll issue next --claim ...) captures the key alone. Step 7
uses that form.
6. Hand back for missing work with a blocker
When the missing piece is other work and not a decision, file it and record it
as a blocker. bot-second finds that the service account cannot read the
file. It has claimed SCRAT-1 but not started it, so the state is already
todo. As bot-second:
lll issue create "Restore read access to the exports bucket" -b "The service account for the importer gets 403 on exports/."
lll issue comment SCRAT-1 -b "Handing back. exports/customers-2019.csv returns 403 for the service account, so the import cannot run. Filed SCRAT-3 for the access. Nothing written."
lll issue block SCRAT-1 SCRAT-3
lll issue release SCRAT-1
As the person, who will do SCRAT-3:
lll issue list --blocked
lll issue claim SCRAT-3
The claim keeps SCRAT-3 itself out of the workers’ queue. As bot-second,
lll issue next --exclude-label handed-back now prints SCRAT-2. As the
person, run lll issue close SCRAT-3. As bot-second, the same
lll issue next --exclude-label handed-back then prints SCRAT-1. A blocked
issue needs no label: lll issue next skips it until its blocker is done.
7. Finish, label the outcome and close
As bot-second:
key=$(lll issue next --claim --exclude-label handed-back)
lll issue start "$key"
lll issue update SCRAT-1 --add-label outcome:changed
lll issue close SCRAT-1
A person had to touch this issue, so it closes as outcome:changed. The three
outcome labels are defined in lll skill get lll, under “Label the outcome
before closing”. An issue abandoned as blocked for good would close carrying
outcome:blocked. As the person, lll issue list --label outcome:changed
lists the closed issue.
What the commands print
The scratch board ran lll built from main at 94ef763 (reports 1.9.0) on
2026-11-30. The prompt names the actor: importer$ and second$ are the
bots, and $ is the person. Every command shown exited 0.
Steps 2 and 3:
importer$ lll issue ask SCRAT-1 "41 rows share an email with another row. Keep the newest row per email, keep the oldest, or reject the file?"
Asked on SCRAT-1 as bot-importer: ask z4etjaoa2kgqrb7
SCRAT-1 needs a human until it is answered: 'lll issue ask SCRAT-1 --wait 1h' blocks for the answer, 'lll issue answer SCRAT-1 "..."' gives it
importer$ lll issue update SCRAT-1 --state todo --add-label handed-back
Updated SCRAT-1: state=todo, labels+=handed-back
importer$ lll issue release SCRAT-1
Released SCRAT-1 (was bot-importer's); cleared assignee
second$ lll issue next
SCRAT-1
second$ lll issue next --exclude-label handed-back
SCRAT-2
Steps 4 and 5:
$ lll issue list --needs-human
SCRAT-1 ○ todo !! Import customers from the legacy CSV export just now
$ lll issue answer SCRAT-1 "Keep the newest row per email. Log the 41 dropped rows to exports/dropped.csv."
Answered ask z4etjaoa2kgqrb7 on SCRAT-1 as scratch
second$ lll issue next --claim --exclude-label handed-back
Claimed SCRAT-1 for bot-second
SCRAT-1
second$ lll issue ask SCRAT-1
#1 answered z4etjaoa2kgqrb7 by bot-importer (just now)
41 rows share an email with another row. Keep the newest row per email, keep the oldest, or reject the file?
answered by scratch (just now): Keep the newest row per email. Log the 41 dropped rows to exports/dropped.csv.
Steps 6 and 7:
second$ lll issue block SCRAT-1 SCRAT-3
SCRAT-1 is blocked by SCRAT-3
second$ lll issue next --exclude-label handed-back
SCRAT-2
$ lll issue close SCRAT-3
Closed SCRAT-3 ● done
Released scratch's claim; assignee unchanged.
second$ lll issue next --exclude-label handed-back
SCRAT-1
second$ key=$(lll issue next --claim --exclude-label handed-back)
Claimed SCRAT-1 for bot-second
second$ lll issue start "$key"
Started SCRAT-1: Import customers from the legacy CSV export (◐ in-progress)
second$ lll issue close SCRAT-1
Closed SCRAT-1 ● done
Released bot-second's claim; assignee unchanged.
$ lll issue list --label outcome:changed
SCRAT-1 ● done !! Import customers from the legacy CSV export bot-second just now
Limits
- Verified: every command on this page, in page order, against a scratch
board, with two bot members and one person on one machine, run from a
shell. Not verified: workers that share one token and use
--agentlabels, answering from the board’s form,lll issue ask --wait, and a real agent deciding when to hand back. - An open ask does not hold an issue back. Step 3 shows
lll issue nextreturningSCRAT-1while its ask was open. handed-backis this page’s convention, not something lll interprets. It works only if every worker passes--exclude-label handed-backand a person removes the label. Answering the ask did not remove it. It is separate from theoutcome:*labels, which an issue carries when it closes.lll issue releasedoes not change the state. After step 7, as the person,lll issue create "Throwaway: release without a state change"madeSCRAT-4. Afterlll issue claim SCRAT-4,lll issue start SCRAT-4andlll issue release SCRAT-4,lll issue list --state in-progressstill listedSCRAT-4, with no assignee, andlll issue list --readylisted onlySCRAT-2.lll issue update SCRAT-4 --state todoreturned it.- The asking member cannot answer. In step 2, between the ask and the update,
lll issue answer SCRAT-1 "keep the newest"asbot-importerexited 4 with “You opened this ask, so you cannot answer it”. The ask stayed open. - After step 7,
lll issue view SCRAT-1printed nothing about the answered ask. The answer is inlll issue ask SCRAT-1andlll issue view SCRAT-1 --json.