Skip to content

Let a to-do say what it waits on, and read Waiting on that in place of Still to do - #7303

Merged
max-sixty merged 3 commits into
mainfrom
waiting-on-an-outside-event
Nov 26, 2026
Merged

max-sixty merged 3 commits into
mainfrom
waiting-on-an-outside-event

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A to-do can now name what its work waits on, in the agent's words: leaf thread reply <ref> --todo "<what you owe>" --waiting-on "<what>", or leaf task create … --waiting-on "<what>". Every surface that words the to-do (its message's head, Threads, the margin, the Page Map, On and a plan step) then says "Waiting on " in the agent's voice in place of "Still to do", until the first start on the to-do takes the work up. On lists such to-dos in a Waiting group after Up next. Max asked for this on a card where the agent held his put-off decision until another one landed, and the card read "Still to do", which reads as queued.

To weigh: Leaf shows the words and reads nothing from them, so the agent's start or end ends the wait; an id of a record on the page could clear itself, but only for waits on the page, and of 17 to-dos on this machine whose titles name a wait, 11 wait on CI or a review. The words are fitted at 30 characters so a thread's name keeps room beside them in Threads. Page protocol 58 → 59, since logged todo and reply records gain waiting_on; deliveries stay leaf-delivery/58.

Scored on Claude Code, 3 runs an arm: deferral-holds-a-todo named the wait 3/3 here against 0/3 on main; its rubric and two controls passed 3/3 on both arms, with no stray use of the flag.

Tests: pnpm run check, tests/model, and the browser tests for On Claude's groups and a held thread's status.

This was written by Claude Code on behalf of max-sixty

…f Still to do

A to-do the agent opens can now name what its work waits on, in the agent's
words: `leaf thread reply <ref> --todo "<what you owe>" --waiting-on "<what>"`,
or `leaf task create … --waiting-on "<what>"`. Every surface that words the
to-do, its message's head, Threads, the margin, the Page Map and On <agent>,
then says "Waiting on <what>" in the agent's voice in place of "Still to do",
until the first start on the to-do takes the work up. A lapse after that reads
Stopped or Gone quiet as before, never Waiting again. On <agent> lists such
to-dos under a Waiting group after Up next, its summary counts them ("1 up
next, 1 waiting"), and a plan step naming one says the same words under its
title.

Max asked for this on a card where the agent held his put-off decision until
another one, Whose Words, landed: the card read "Still to do", which reads as
queued rather than as waiting on something outside the agent.

What to weigh:
- Words, not an id. Leaf shows the words and reads nothing from them, so it
  never decides the wait is over; the agent's start or end does. An id naming
  a record on the page could clear itself, but only for waits on the page. Of
  277 to-dos in 727 page logs on this machine since 1 October, 17 titles name
  what they wait on ("once …"): 11 wait on CI or a review, which agents watch
  with progress lines (one posted 24), and 4, this one among them, wait on
  something on the page that nothing watches. Those 4 read Still to do.
- The words are fitted at 30 characters, cut at a word as titles are at 80,
  since they stand in a status's place: at 30 a short thread name still shows
  beside them in Threads; with 75 it was cut to "The card's t…".
- Page protocol 58 -> 59: logged `todo` and `reply` records gain `waiting_on`.
  The delivery record is unchanged, so deliveries stay `leaf-delivery/58`.
- The delivery handling for an agent-written answer, threads.md and
  conversation-loop.md name the flag. Eight eval cases' pasted handling
  follows the registry's new clause.

Scored on Claude Code, three runs an arm against main: deferral-holds-a-todo
named the wait ("the backing-box change") 3 of 3 on this branch, against 0 of
3 on main, where the flag doesn't exist; its existing rubric passed 3 of 3 on
both. The controls handoff-holds-a-todo and todo-outlasts-the-turn passed 3 of
3 on both arms, and no run there used `--waiting-on`.

Tests: `pnpm run check`, `tests/model`, and the two browser tests on On
Claude's groups and a held thread's status pass.

Known limit: a row's status never shrinks (`.lf-rows`' end column), so on a
phone a 30-character wait still squeezes a thread's name in Threads, as the
longest existing statuses do to a lesser degree.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A to-do that ends without ever being started keeps its waiting_on, so a finished plan step still says it is waiting. Only a start clears the field in _todos; a todo_end, or a version whose --completes names the to-do, leaves it set. plan_reading then serves it on the done step, and planStep draws todoWord(step) there: the step gets a check mark, but its label and its visible detail line say "Waiting on review". To reproduce, create a to-do with --waiting-on review, add it to a plan, and end it with leaf task end <id> done without a start. The served step is state: done, detail: None, waiting_on: "review". The schema's own description says the field holds only "until a start takes it up", so ended records contradict it too. Details are inline. Happy to push the fix if you'd like.

Comment thread src/leaf/records/todos.py Resolved
A to-do ended without a start kept its waiting_on, and the plan step
naming it read "Waiting on …" beside its check mark.
@max-sixty
max-sixty merged commit 7756a0b into main Nov 26, 2026
7 checks passed
@max-sixty
max-sixty deleted the waiting-on-an-outside-event branch November 26, 2026 20:49
max-sixty added a commit that referenced this pull request Nov 26, 2026
… and can send (#7304)

A reaction is now a message whose content is one emoji, and the turn
rules for words apply to it unchanged, from either side. The user's
reaction wakes the agent and is owed a reply, and, like their next
message in a thread, answers the agent's open questions before it, so
the per-emoji `settles` fact goes. The agent can answer with one: `leaf
thread reply <ref> --done --emoji 👍`, drawn as its message. `$reactions`
is now only the picker's ordered list; admission checks one emoji's form
(a pattern on the record's `emoji`, read as ECMAScript in both
runtimes), not membership. One handling clause replaces the two reaction
clauses: act on it, ask what the user meant, or answer in a line saying
how you read it. Max chose this on a decision page ("Send each reaction
to the agent as you put it on").

To weigh: the page protocol moves 59 → 60 (main took 59 for #7303),
since a logged reaction changes meaning. Examples must owe nothing at
rest for the site build, so `ship-review`'s 👍 now has the agent's answer
(catalog previews recaptured) and the feature gallery's twelve seeded
reactions are gone. A reaction still draws as a mark until anything is
said in its thread, then as a thread; the picker keeps it pressed and
takes it back until the thread is resolved, and one the agent answered
keeps its place, Deleted, as words do.

`queue/mixed` eval, Claude Code, 3 runs an arm: base with the user's "I
also put a few reactions" line 3/3, head without it 3/3, every reaction
arriving on its own. Tests: touched model, process and browser tests by
node id, `pnpm run test:runtime`, `pnpm run check`.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude <[email protected]>
max-sixty added a commit that referenced this pull request Nov 26, 2026
… brings its to-do back (#7312)

Each delivery batch now lists the page's open to-dos that name a wait
(`held`: id, text and `waiting_on`), whatever its input, and an event
that owes an answer is told to start such a to-do, as well as the input,
where the input frees it. Before this, a to-do held with `--waiting-on`
(#7303) came back only if the agent remembered it: `leaf page state`
carries `waiting_on`, but agents run it at will (98 of 191 Leaf sessions
on this machine last week ran it at all, and about a third of its calls
projected `obligations` away), and nothing Leaf pushes named a held
to-do. Max asked for a primitive so the agent needn't remember such work
across a long context.

To weigh: Leaf reads nothing from a wait's words, so it lists every held
to-do with every batch and the agent judges which input frees one; the
clause rides only events that owe an answer, and the reference states
the rule for any input. DELIVERY moves to since 59, so pasted eval
envelopes read `leaf-delivery/59`. Also fixes a Codex reply correction
that picked the first batch from the page in its delivery, which, after
two watch passes while Codex was busy, held another input and so carried
no events.

Scored on Claude Code, 3 runs an arm, with the new case
`held-todo-returns-with-its-input`: a Done on the choice the to-do waits
on started it 6/6 with this change (two wordings), 0/3 with main, and
0/3 with this change's references but main's delivery; a question
elsewhere on the page left it held in all 12 runs.

Tests: the delivery, contract, to-do, hook and Codex App Server model
tests, and `pnpm run check`.

> _This was written by Claude Code on behalf of max-sixty_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants