Repository navigation
fix: leave sessions whose pull requests merged out of Needs you - #455
Merged
Merged
Conversation
…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.
This comment has been minimized.
This comment has been minimized.
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.
…ide-the-tickets-link-in-the # Conflicts: # docs/getting-started.md # docs/llms.txt
kalaspuff
approved these changes
Nov 7, 2026
kalaspuff
deleted the
fctl/906-why-is-the-hide-the-tickets-link-in-the
branch
November 7, 2026 15:42
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.
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_aton the session, set by SessionDO as it delivers a message with an author and written through to a new D1 column (migration0052_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.tscover the rule. Incargo xtask dev,fctl sendsetmessaged_aton 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, incargo 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):Worth confirming
messaged_at, so after a merge the reply to it doesn't show in Needs you.fctl session
Note
Medium risk. It adds a nullable column to the sessions table in D1 (migration 0052) and an optional
messaged_atfield 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.needsOfin the web app compares it with each pull request'sstate_changed_at.New D1 migration and API field.
0052_session_messaged_at.sqladds a nullablemessaged_atcolumn, andSessiongains an optionalmessaged_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