Repository navigation
Description
Outcome
A question with a short, fixed set of answers, such as "open the pull request now, or hold it?", should be a choice the user presses wherever it is asked. Then the page shows which way each question went, and 1–9 answer it wherever the user meets it. threads.md ("Ask for a pick") already tells the agent to ask such a question with an lf-options choose group in the message's --markup. Two routes fall short of that today.
1. The turn-end check asks in words
When an agent's reply leaves the user such a question without putting it On me, the turn-end check opens a new thread whose opening message asks it with --obligation, and the user answers by replying. Compared with a choice, that loses:
- The state at a glance. A pick shows in the group as the checked option. A question asked in words is answered by the user's next message in its thread, whatever it says, or by a 👍. A clarifying reply such as "before I decide, how does the schedule change?" ends it: On me moves it to Done as "Answered: before I decide, how does the schedule change?" while the decision is still open, and the agent has to ask again. A reply in words leaves a choice's question open: it passes to the agent until the agent answers, then waits on the user again.
- Keyboard answers.
mlands on a choice in a thread message and1–9pick its options. A question asked in words takes only a typed reply (c) or a 👍 reaction (e).
clerk.py writes what the agent would write without a widget, because "the fork can't author the page". Its ANSWER schema gives each ask only page, title, text, passage and quote, and _put opens the thread with obligation=True. Its docstring already names the cost above: "a clarifying reply such as "where do I run it?" answers it, and the agent has to ask again."
One way to get there: let an ask in the fork's answer carry an optional list of options, each with a title saying what choosing it does, whether it is recommended, and optionally a line on what it costs. Where the list is present, Leaf builds the lf-options choose group itself and passes it as the opening message's markup in place of obligation=True, so the fork still authors no markup. open_thread already takes markup and refuses obligation beside a widget that asks. _ask skips an ask whose title matches a thread opened with obligation, so it would also need to count threads opened with a choice. turn-end-check.md would ask for options wherever the answers can be listed, as "Ask for a pick" does for the agent, and keep asking in words for a step the user takes, such as "run this and reply with what you saw".
2. On me can't answer a choice that stands in a thread message
On me's card for a page choice shows its options and takes 1–9. For a choice posted in a thread message, while that thread isn't drawn on the page, the card shows only Discuss and Show, and 1 does nothing. Once the user picks inside the thread, the Done row reads a bare "Answered" rather than "Answered: " until the thread is drawn again. In obligations/view.js, choicesOf returns null "while the obligation's source has no node, as in a thread turn not yet drawn". answerWords in obligations/answer.js needs the element to format the pick.
So a choice asked in a thread is answerable by key only after the user opens the thread or reaches it with m, and On me can't say which way it went. Once the turn-end check asks with choices, most of its asks would be in this case. For a question asked in words, On me's card already draws the message that asks it. Drawing the message that holds a thread's choice the same way may be one route to giving that card its options, their digits, and the pick's title.
Smaller: point to the choice where agents reach for --obligation
leaf thread create --help says "Use --obligation when the next move is the user's" and doesn't mention a widget in --markup. leaf thread reply --help names "a widget in --markup that asks" as the alternative, but not when to use it. A clause on each saying that a question whose answers can be listed takes a choice in --markup would put that route in front of the agent at the point it reaches for --obligation.
Repro
Turn-end check:
- In a Claude Code session holding a page, have the agent end a turn with a reply that asks the user a yes-or-no question in chat and puts nothing On me.
- The turn-end check opens a thread with
--obligationwhose message asks the question in words, with no options to press. - Reply in that thread with a clarifying question. On me moves the item to Done as "Answered: ".
On me and a thread's choice:
leaf thread create <page> --text "Ship on Friday?" --markup '<lf-options id="ship" choose><lf-option id="ship-friday"><strong>Ship Friday</strong></lf-option><lf-option id="ship-wait"><strong>Wait a week</strong></lf-option></lf-options>'- Open the page with no thread open, and open On me. The card shows Discuss and Show and no options, and pressing
1with the card focused changes nothing. - Open the thread, pick "Ship Friday", close the thread, and look at On me's Done. The row reads "Answered".
Seen on leaf 0acede6, installed 2026-11-04T18:21:10-08:00.
This was written by Claude Code on behalf of max-sixty
Activity
leaf-agent commentedon Nov 5, 2026
#5407 adds the smaller part:
leaf thread create --helpandleaf thread reply --helpnow say that a question whose answers can be listed takes anlf-optionschoice in--markup. CI is running on it. It doesn't close this issue.On ordering the two larger parts: On me answering a thread's choice should come before the turn-end check asking with options. The issue already notes that most of the check's asks would be thread choices. Landed first, the clerk change would turn questions that On me can at least answer by reply into ones it can't answer at all until the thread is drawn. Where each part slots in:
choicesOfinobligations/view.jsreturns null because there are no source controls. The card atfloating-panel.jsthen falls back to Discuss and Show. For a reply asked in words, that same card already draws the message that asks it (carriedandmessage, with its rank inthread/messages.jsauthoredRank). Drawing a widget obligation's message the same way would givechoicesOfa node. It would also givelf-options.answerWordsthe group it needs for "Answered: ".optionslist on each ask inANSWER._putwould then build thelf-options choosemarkup in place ofobligation=True, and_ask's dedupe atclerk.pywould also count threads opened with a widget that asks.turn-end-check.mdandanswer_formwould change with it. That's a prompt change, so it should be scored withleaf-dev eval 'turn-end-check*' --harness claude-code --basebefore and after. This CI sandbox can't run that eval.feat: point thread create and reply help at a choice for questions wi…
Keep a thread's choice where the page shows it while On Me is open
Rank On Me's messages aside through the panel's registration, not the…
Let a thread choice's On Me card follow its widget, and find kept ele…
Record why On Me's card reads a mark rather than where the widget stands
Answer a choice asked in a thread from its On Me card (#6056)