Skip to content

Let thread messages register user obligations - #3666

Merged
max-sixty merged 4 commits into
mainfrom
codex/on-me-obligation-evals
Oct 23, 2026
Merged

max-sixty merged 4 commits into
mainfrom
codex/on-me-obligation-evals

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Agents can now send a plain thread message that waits on the user: --obligation on thread open, thread reply, or response reply atomically registers the message on On me. Previously they needed a widget such as lf-ask to 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-approval widget: 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:

Scenario Repeated candidate samples Result
New-thread clarification 2/2 Plain messages used --obligation; chat answers retired both requests
Existing-thread clarification 2/2 Replies used --obligation; user replies answered both requests
Page-wide question 2/2 Accessible threads with open canonical message obligations on On me
Informational update 2/2 Plain thread updates; no obligations and empty On me

All 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@2872ba319 passes placement and On me outcome in both arms. Main uses lf-ask and fails only the new API-adoption metric; the candidate uses --obligation and 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 1 and uv run leaf-dev eval document/page-question document/page-update --base 2872ba319 --harness codex -j 1. Run IDs: 20261022-182956-o3yzsnop (8/8) and 20261022-184322-ycl80w7a (matched comparison; expected base API failure). Real-CLI grader controls also passed 3/3, separating flagged messages, widget questions, and unregistered prose.

This was written by Codex on behalf of max-sixty

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 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.

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
leaf-agent previously approved these changes Oct 23, 2026
@max-sixty
max-sixty merged commit c5e3e29 into main Oct 23, 2026
3 checks passed
@max-sixty
max-sixty deleted the codex/on-me-obligation-evals branch October 23, 2026 02:44
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]>
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