Repository navigation
Let thread messages register user obligations - #3666
Merged
Merged
Conversation
Add --obligation to thread open, thread reply and response reply. Fold explicit message requests and user tasks into the canonical obligation inventory, preserving conversational replies versus explicit task completion. Keep exact message navigation available without a page anchor and retain task thread dependencies through Undo. Teach agents to register requests when the next move belongs to the user. Extend native evals with page-wide questions, existing-thread replies and an informational negative control; grade API adoption separately from On me outcome.
leaf-agent
reviewed
Oct 23, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The PR description holds merge until the repeated native evals and current-main comparison are reported. I’m withholding approval until those results are available.
leaf-agent
previously approved these changes
Oct 23, 2026
leaf-agent
approved these changes
Oct 23, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
The Leaf panel's row used to end in an On me mark, a Threads mark, and a seat kept empty for the ✕ (#3651). That left a gap at the row's end and cut the status words short. Now the row ends in one seat holding one button. At rest it is the On me mark, with its count and a dot while a thread holds an unread reply. While a view, stance or search is open, it is the way out (Close, Exit Draw mode, Close search…), in exactly the mark's place. The press that opens a view leaves the user on what closes it, and nothing needs room kept. A draft with no way out standing still lets the field reach the row's end (#4105). Threads is now a tab of the On view (On me · On ‹agent› · Threads · Plan), since On me already lists a thread message that waits on the user (#3666). Its Open/Unread/Drafts/Resolved filters are gone. Open threads come first, each saying New or Draft, then resolved ones under a Resolved heading, as Done items stand under On me. With nothing on the user but an unread reply, the mark opens Threads directly. `g T` and `g M` are unchanged. The user chose this design from three candidates on a Leaf exploration page: today's row, the two marks tidied with the ✕ before them, and this one. What users lose: the open-thread count moves from the row to the Threads tab; Threads by pointer is the mark, then its tab; the On me count is out of sight while a view or stance stands. Navigating the diff: - `browser/runtime/floating-panel.js`: the seat (`quick`, `seatHeld`, the one button in `paintNow`), `onTabs`/`onTab`, `threadsView` and `pressMark`. The header records the decision and the rejected alternatives. - `browser/styles/floating-panel.css`: the seat's fixed width; the exit seat and the second mark's rules are removed. - `lf-sample`'s `showThread` drops `status: "resolved"`, which only chose a filter. - Tests open Threads through one pointer helper (`dev/leaf_dev/browser.py`, `open_threads`, re-exported by `tests/render_harness.py`); tools that run one checkout's driver against another's runtime (`stills`, `bench-latency`, thread snapshots, `verify-site`) use `go_to_threads` (`g T`), which both runtimes share. Tests read the open count through the runtime's `threadCounts`, now on the check API. About 70 test files move to the new selectors; tests whose subject was a filter or the second mark were rewritten for the new behaviour, none deleted. - Prose: the glossary's Leaf panel entry, `docs/how-it-works.html`, `docs/threads.html`, the two developer galleries and `live-samples.md`. Checked: `pnpm run test:runtime`, `pnpm run check:browser`, ruff and pre-commit, and about 40 selected browser tests (opening Threads, the Resolved section, unread news, focus and rings, Draw-mode exit, the drafted field reaching the row's end). A probe on `review-a-plan` showed the seat's position and width unchanged at rest, in On me, in Threads, after Close and in Draw mode. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents can now send a plain thread message that waits on the user:
--obligationonthread open,thread reply, orresponse replyatomically registers the message on On me. Previously they needed a widget such aslf-askto register that request. The next user reply or settling reaction answers it, and an agent can retire it when answered elsewhere.User tasks can attach to threads and join the same canonical obligation inventory, while retaining explicit Done completion. On me opens the exact requesting message even when its thread has no anchor or its anchor was removed. Attached tasks preserve their thread's lifetime through Undo. The merged approval redesign remains an ordinary
lf-approvalwidget: widget approval, conversational answers, and task completion each settle only their own obligation.The shipped instructions teach agents to flag messages that hand the next move to the user and omit the flag for informational updates. Native evals cover new page threads, clarification in an existing thread, chat answers, and an informational negative control. Outcome and API adoption are graded separately, with real-CLI controls distinguishing flagged messages, widgets, and unregistered prose.
Validation after integrating main: 22 focused Python admission/lifecycle and approval tests; five Chromium browser journeys covering message anchors, task Done/Undo, and approval inside a thread; full
pnpm run check(framework, 523 runtime tests, 85 worker tests). Earlier validation includes Firefox navigation, live independent browser use, eval harness smoke tests, and matched startup with no extra requests. Independent code review verified the task-reference lifetime repair and the combined widget/message/task completion boundaries.Native Codex results:
--obligation; chat answers retired both requests--obligation; user replies answered both requestsAll eight samples pass every assertion, with no harness errors. Direct inspection of the canonical records agrees: four answered requests leave On me, two unanswered requests remain, and both informational controls create none. Each positive trace reads the shipped instructions and executes the flag; the user prompts never prescribe it.
A separate matched run against
main@2872ba319passes placement and On me outcome in both arms. Main useslf-askand fails only the new API-adoption metric; the candidate uses--obligationand passes it. Both arms pass the informational control. This demonstrates adoption of the new plain-message route, not an increase from a failing widget-registration baseline. It is a small behavioral sample, not a general reliability estimate.After integrating main’s approval widget and authoring-instruction changes, a fresh question/informational pair also passes 2/2 with zero errors (
20261022-192818-2kbzth3y). Canonical records show one open message obligation for the question and none for the informational update.Reproduce with
uv run leaf-dev eval document/page-question document/clarification document/clarification-reply document/page-update --harness codex --repeat 2 -j 1anduv run leaf-dev eval document/page-question document/page-update --base 2872ba319 --harness codex -j 1. Run IDs:20261022-182956-o3yzsnop(8/8) and20261022-184322-ycl80w7a(matched comparison; expected base API failure). Real-CLI grader controls also passed 3/3, separating flagged messages, widget questions, and unregistered prose.