Skip to content

A thread counts as "Waiting on you" whenever the agent spoke last, so an answered question stays an open ask #52

Closed

Description

@max-sixty

The rule is turn order, not intent:

// runtime/conversation/reconcile.js
const awaitsReader = (t) => !t.resolved && t.msgs.at(-1).author === "claude";

So any unresolved thread where the agent replied last is counted in "Waiting on you" and stepped to by n/p. The agent has no way to say its reply asks for nothing.

Repro

A page with one section. Reader comments on it; agent replies with a complete answer that asks for nothing back. The thread is now "Waiting on you".

Why the existing states do not cover it

  • Leave it open — right, since the reader may want to follow up. But it is counted as an outstanding ask.
  • Agent resolve — clears the count by closing the thread. leaf resolve --help scopes that to "cases where waiting on them says nothing: they asked for it closed, or the thread is plainly moot". An answered question is neither.

There is no answered-and-open state, so the banner conflates "the reader may want to reply" with "the page needs something from the reader".

What I would expect

The agent declares whether its own reply leaves an ask standing, the way x-awaits lets a widget declare one — say --awaits on leaf reply, defaulting off. A reader comment still opens an ask; the agent's answer closes it unless it flags otherwise; a reader reply reopens it.

The count then means "things the page needs from me" rather than "threads where the agent spoke last". On a page with a long conversation those diverge a long way, and the banner stops being worth reading.

Seen on leaf a3e4e78.

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

Activity

  1. added
    enhancement
    on Aug 26, 2026
  2. leaf-agent commented on Aug 26, 2026

    @leaf-agent
    Collaborator

    Thanks — the reading you quoted is the whole rule, and it has exactly three consumers, all of them the panel's own: inFilter, the count on .lf-needs in paintNarrowing, and the w row's liveness. n/p is a different list — openAsks over x-awaits widgets, and its own comment says so: "the panel's count is a different fact — threads open, not answers owed." A prose reply is not in that walk; a widget an agent sends in a reply is, through answeredThreadAsk. So the surface to change is smaller than the report suggests, which is in your favour.

    The more useful find: the argument for the current rule is already written down, for the mirror direction. unanswered_asks says reading the last speaker means "a thread that needs no answer — 'great, ship it' — holds a turn until the agent replies or runs leaf resolve. That is the direction to err in," and settles it by asking who can see each failure: the agent holds the context and it costs one command. Run that same test on the reader's side and it points the other way — the agent still holds the context, but there is no command that clears the count without closing the thread, so the cheap settlement the agent-side rule leans on doesn't exist here. Your --awaits is that missing command.

    Two forks I'd want decided before anyone writes it, since both are places the change can quietly grow a second representation:

    leaf comment has to default the other way. An agent-opened thread is an ask by construction — its own help says the user answers it in the browser and resolves it there. awaitsReader reads msgs.at(-1), so with awaits defaulting off across the board, an agent's question drops off the count the moment it is asked.

    A reply carrying x-awaits markup already declares an ask, structurally. That widget is in the n/p walk today. A flag beside it is a second spelling of the same fact, and the two can disagree — a reply flagged --awaits whose widget is already answered, or an unflagged reply carrying an open question. Deriving the fact from the markup where the reply carries a request, and reserving the flag for a prose ask, keeps one answer to one question.

    Where the change lands, and what it does not touch
    • The rule itself: model.js#L122-L123.
    • The field is a durable logged contract, not a CLI-local flag: $events.kinds.reply.record is additionalProperties: false, $events is stamped into the vendored registry, and page init checks an existing log against the incoming record schemas.
    • The browser door closes with the shape markup already uses — "not": {"required": ["awaits"]} in the kind's browser schema, validated by event_record_error — since a reader's reply always awaits the agent.
    • Writers: cmd_reply and the CLI options.
    • awaits_agent (events.py#L372-L384) is untouched, so the stop hook still blocks on a reader's last word. Both sides already declare that neither reading is the other's negation; this widens the gap a third way — open, and awaiting nobody — which the stated model admits rather than contradicts.
    • seats_with_agent reads awaits_agent, so the widget-seat rule is unaffected: an agent reply already hands a seated request back to the reader, flag or no flag.
    • Existing coverage of the count and the narrowing is tests/test_render_conversations.py around L591–L628.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions