Skip to content

fix: leave sessions whose pull requests merged out of Needs you - #455

Merged
kalaspuff merged 3 commits into
mainfrom
fctl/906-why-is-the-hide-the-tickets-link-in-the
Nov 7, 2026
Merged

kalaspuff merged 3 commits into
mainfrom
fctl/906-why-is-the-hide-the-tickets-link-in-the

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Needs you listed every session that was idle and waiting for a message as "Waiting for your reply". After a merge, fctl wakes the agent for its last steps, and when that turn ends the session waits again until its idle timeout stops it, 10 minutes by default. So a session whose pull request had merged, with nothing left to do, stayed in Needs you for that long, and counted in the tab title and on the app icon. Needs you now leaves out that wait when all of a session's pull requests are merged or closed and nobody has written to the session since the last of them was. If someone does message it after the merge, the agent's reply still shows. A question from its agent (fctl ask), failed checks, a failure or a pause still show as before. A session with a draft, open or not-yet-looked-up pull request, or none at all, still shows when it waits.

To tell those cases apart, the control plane now records when a person last sent a session a message. This is a new optional messaged_at on the session, set by SessionDO as it delivers a message with an author and written through to a new D1 column (migration 0052_session_messaged_at.sql). Hosts and agents are unaffected. On sessions from before the column, Needs you treats it as if nobody had written to them.

Unit tests in needs.test.ts cover the rule. In cargo xtask dev, fctl send set messaged_at on both the session list and the single session. In the browser, a pull request merged before the message kept "Waiting for your reply", and one merged after it cleared the entry. The web and Rust checks pass. Before and after, in cargo xtask dev, with a fake-claude session that is waiting and whose pull request is shown as merged (the sidebar's session lists were rewritten in Playwright, since the dev stack has no GitHub):

Before After
before-sidebar.png after-sidebar.png

Worth confirming

  • Decision: the rule uses the session's pull requests and people's messages, not its retrospective or a new "done" signal from the agent. That way the agent and the host don't change, and it works in projects that have retrospectives turned off.
  • Decision: only messages that reach fctl count. A message someone types to the agent through Remote Control in the Claude apps doesn't set messaged_at, so after a merge the reply to it doesn't show in Needs you.
  • Decision: only Needs you changes. Followers still get the "waits for your reply" notification when the agent's turn after a merge ends.

fctl session


Note

Medium risk. It adds a nullable column to the sessions table in D1 (migration 0052) and an optional messaged_at field on the session API, and changes which sessions the web app lists in Needs you. The column and field are optional, so older hosts and control planes keep working.

What it does. Sessions whose pull requests have all merged or closed no longer show in Needs you as waiting for a reply, unless a person messaged the session after the last of those pull requests landed. To tell the cases apart, SessionDO now records messaged_at, when a person last sent the session a message, and writes it through to a new D1 column. needsOf in the web app compares it with each pull request's state_changed_at.

New D1 migration and API field. 0052_session_messaged_at.sql adds a nullable messaged_at column, and Session gains an optional messaged_at. Messages typed through Remote Control in the Claude apps don't set it.

fctl review's first look at f46b97e · 12 files, +103 −14 · Review agent settings

…ds you

A session idles, waiting for a message, until its idle timeout stops it.
Needs you listed every such session as waiting for your reply, so one
whose pull requests had all merged, and whose agent had finished the
work, stayed there for up to ten minutes. Once a session's pull requests
are all merged or closed, its wait is no longer listed.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner November 7, 2026 15:15
@fctl-review

This comment has been minimized.

Comment thread web/src/lib/needs.ts Resolved
The control plane now notes when a person last sent a session a message
(Session.messaged_at, written through to D1's sessions.messaged_at by a
new migration). Needs you leaves a session's wait out only when its pull
requests are all merged or closed and nobody wrote to it after the last
of them was, so a question asked after the merge still shows its reply.
@fctl-sh fctl-sh Bot changed the title fix(web): leave sessions whose pull requests merged out of Needs you fix: leave sessions whose pull requests merged out of Needs you Nov 7, 2026
…ide-the-tickets-link-in-the

# Conflicts:
#	docs/getting-started.md
#	docs/llms.txt
@kalaspuff
kalaspuff merged commit 530ed2b into main Nov 7, 2026
13 checks passed
@kalaspuff
kalaspuff deleted the fctl/906-why-is-the-hide-the-tickets-link-in-the branch November 7, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant