You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ending a thread question with leaf task end leaves the thread reading as unanswered #5804
An agent asks a question in a comment thread with --obligation, for example "Should I go ahead with X?". The user answers in the terminal session rather than in the thread. The agent then settles the obligation with leaf task end <page> message:<id> done --text "Answered in the session: go ahead once Y lands.".
That removes the item from On Me, but the thread itself is unchanged: its last message is still the agent's question. Later, X happens. Nothing prompts the agent to come back to the thread, and the turn-end check, which does catch stale page text, doesn't look at threads. A day later the user opens the thread, sees "Should I go ahead with X?" as its latest word, and has to ask whether it is still current.
Expected
A thread whose question was settled shouldn't keep reading as an open question. Two possible fixes:
leaf task end … message:<id> done|dropped posts its --text as an agent reply in that thread, so the thread shows how the question was settled. Or it requires a thread reply first.
The turn-end check also flags a thread whose last message is an agent question whose obligation has ended, or whose subject the session has since completed.
The skill already tells agents to reply in a thread once the work it discusses is done (authoring-revisions.md, "Keep the current page current"). But task end looks like the whole job, and nothing visible says the thread still needs a reply.
Repro
On a page with one section, post a thread message with --obligation that asks the user a yes/no question.
Run leaf task end <page> message:<id> done --text "answered elsewhere".
Open the page: the thread's latest message is still the unanswered question, with no sign it was settled.
Seen on leaf 8a26e59, installed 2026-11-09T19:27:43-08:00.
This was written by Claude Code on behalf of max-sixty
The thread's reading already knows how the question ended. The browser just doesn't show it inside the thread. I haven't opened a PR, because the three places this could be fixed are a product choice, not a bug with one obvious repair.
Why the thread still reads as open.task end message:<id> done|dropped runs end_question. That sets the record's status to answered_elsewhere or withdrawn, stores --text as end.detail, and clears next_actor. The thread card labels a message only while its question has next_actor === "user" (thread-card.js). So the "Waiting on me" label goes away and nothing takes its place. "Answered elsewhere" / "Withdrawn" (obligationEnding) only shows on the Done row and in the floating panel, never in the thread.
Where a fix could go:
Label the question in the thread. A message whose question has ended would show obligationEnding plus end.detail where "Waiting on me" used to be. This touches only the browser and uses data the thread already has (thread.obligations), so the thread would say how the question was settled without a new event. It doesn't help with the issue's second half (X happens later and nothing brings the agent back).
task end posts --text as an agent reply. This is the issue's first option. It turns a settlement into a turn in the thread, so it runs into reply admission, workflows and thread attention. --text would also need a new meaning: today it's a note on where the answer is ("Answered in the session"), and it would become words the user reads in the thread. "Requires a thread reply first" would be a new refusal on a command whose job is to record an answer given somewhere else.
The turn-end check looks at threads too. Right now stale in turn-end-check.md is limited to "what a page, not a reply, still says". This is the only option that covers "X happened, so the thread's question is out of date." It changes shipped instructions, so clerk.py asks for a leaf-dev eval 'turn-end-check*' run before and after.
My suggestion is to do the first and third together. The first stops the thread from reading as open as soon as task end runs. The third catches a thread whose subject the work later overtook. The decision I need is which of these you want, in particular whether a settled question should stay a label or become a real reply in the thread.
Activity
leaf-agent commentedon Nov 10, 2026
The thread's reading already knows how the question ended. The browser just doesn't show it inside the thread. I haven't opened a PR, because the three places this could be fixed are a product choice, not a bug with one obvious repair.
Why the thread still reads as open.
task end message:<id> done|droppedrunsend_question. That sets the record'sstatustoanswered_elsewhereorwithdrawn, stores--textasend.detail, and clearsnext_actor. The thread card labels a message only while its question hasnext_actor === "user"(thread-card.js). So the "Waiting on me" label goes away and nothing takes its place. "Answered elsewhere" / "Withdrawn" (obligationEnding) only shows on the Done row and in the floating panel, never in the thread.Where a fix could go:
obligationEndingplusend.detailwhere "Waiting on me" used to be. This touches only the browser and uses data the thread already has (thread.obligations), so the thread would say how the question was settled without a new event. It doesn't help with the issue's second half (X happens later and nothing brings the agent back).task endposts--textas an agent reply. This is the issue's first option. It turns a settlement into a turn in the thread, so it runs into reply admission, workflows and thread attention.--textwould also need a new meaning: today it's a note on where the answer is ("Answered in the session"), and it would become words the user reads in the thread. "Requires a thread reply first" would be a new refusal on a command whose job is to record an answer given somewhere else.staleinturn-end-check.mdis limited to "what a page, not a reply, still says". This is the only option that covers "X happened, so the thread's question is out of date." It changes shipped instructions, soclerk.pyasks for aleaf-dev eval 'turn-end-check*'run before and after.My suggestion is to do the first and third together. The first stops the thread from reading as open as soon as
task endruns. The third catches a thread whose subject the work later overtook. The decision I need is which of these you want, in particular whether a settled question should stay a label or become a real reply in the thread.Say in a thread how its question ended once the agent ends it (#6051)