Repository navigation
feat: agents ask people for their input with fctl ask - #441
Merged
Merged
Conversation
An agent that needs a person to go on asks with fctl ask, offering answers to click (-o), and ends its turn. The call goes through fctl-agent and its host like fctl memory (AgentCall::Ask). SessionDO keeps the session's one open question (Session.question, written through to sessions.question by migration 0051), shows it to viewers and dashboards at once, and drops it when a person's message arrives. Followers hear of it as the turn ends, in a notification of its own: "shop#231 asks you", with the question and its answers. The session page shows the question above the composer with its answers as buttons; the transcript keeps a question_asked notice; the Agent Floor, project pages and the sidebar show sessions that ask in blue; fctl show and fctl sessions print the question. fctl-agent tells Claude about fctl ask where the sandbox's fctl has it, and fake-claude asks with 'ask <question> / <answer> / <answer>' (ADR 0078).
This comment has been minimized.
This comment has been minimized.
…topped A question stayed on a session that failed or that someone stopped, so lists and the sidebar went on saying it asked, with nobody able to answer. It goes now when the session fails, and when FleetDO stops it for a person or a deletion (ControlState::drop_question); an idle stop or a runner's drain keeps it, since a message resumes the session and answers it. Also puts SessionDO's ask and the transcript's QuestionNotice where they don't take another's doc comment.
This comment has been minimized.
This comment has been minimized.
… once - A question that came after FleetDO's stop dropped one, or after the session failed, stayed with nobody to answer it: SessionDO refuses a new one while the session is stopping, stopped or failed (taking one back still goes). - The same question again, as an agent that retries after a timeout asks it, no longer publishes it again or notifies again. - Find in the transcript reads a question_asked notice as its question alone, as the page shows it. - fake-claude asks only on a line that starts with 'ask', not wherever a message says it (fctl's follow-ups do).
Contributor
Author
|
On the finding in the review summary (find in page): fixed in 0bbc0e3. |
This was referenced Nov 7, 2026
# Conflicts: # crates/fctl-domain/src/validate.rs # crates/fctl-proto/src/api.rs # docs/architecture.md
kalaspuff
approved these changes
Nov 7, 2026
Closed
3 tasks done
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
Agents can now say they need a person. Instead of ending a turn with a question buried in their last message, an agent runs
fctl ask "Round Danish prices to whole kroner, or keep øre?" -o "Round to whole kroner" -o "Keep øre"and ends its turn. The question shows above the session's composer with its answers as one-click replies, in blue on the Agent Floor, project pages and the sidebar, and infctl showandfctl sessions. People who follow the session get a notification of its own: "shop#231 asks you", with the question and its answers. Any message from a person answers it: an answer clicked is sent as the reply as it is, and the question goes away.fctl askgoes through fctl-agent and the host to the control plane likefctl memory(AgentCall::Ask), so no credential enters the sandbox. SessionDO keeps the session's one open question (Session.question, written through tosessions.questionby migration 0051), broadcasts it at once, and drops it when it delivers a message with an author, whether it came from the page, the CLI or Linear.fctl ask --withdrawtakes it back, and a new question replaces the old one. Review agents ask nobody.Kind::Askinginstead of an ordinary finished turn, to people who want to hear when a session waits for them. A question asked after the turn ended notifies at once.fctl askwhere the sandbox's fctl has it, instead of "say so plainly and stop", and writes aquestion_askednotice so the question stays in the transcript after it is answered. fake-claude asks withask <question> / <answer> / <answer>.I tested it end to end in
cargo xtask devwith fake-claude: the question went through fctl-agent and the host, showed on the page, in the list and infctl show, and clicking an answer sent it and cleared the question. Unit tests cover the validation, the notification text and digests, the CLI's arguments, fctl-agent's instructions, fake-claude's word matching and the question card. Clippy (native and wasm), the touched crates' tests,npm run checkand the web tests pass. ADR 0078 records the decision.Hosts and fctl-agents from before this refuse the call, and
fctl askthen tells the agent to update the runner's fctl. Their agents keep the old instruction, because fctl-agent checks whether the sandbox's fctl hasfctl ask.Screenshots
From
cargo xtask devat 79f528c, 1440 px wide, cropped to the page.What the agent asks, above the composer, and in the transcript:
After clicking an answer: it's sent as the reply, and the question goes:
The Agent Floor:
Related
The sidebar work comes in four pull requests: #440 (merged), this one, #442, and #443, which builds the tree sidebar on all three. This branch has main merged in since #440 merged. #441 and #442 both add a command on neighboring lines of
fctl'smain.rs, so whichever merges second needs main merged in first; #443 shows how that resolves.Worth confirming
fctl session
Note
Medium risk. It adds a field to the session protocol, a new migration, a new agent-facing call and a new API and state in the session Durable Object, all of which hosts and agents one version behind must tolerate.
What it does. Adds
fctl ask, which lets an agent put a question to people, with optional answer choices, in the middle of a session. The question is stored on the session, shows in lists, the sidebar and a card on the session page, and is cleared when a person answers or when the session fails or is stopped. A late question on a stopping, stopped or failed session is refused, and an identical repeat changes and notifies nothing.New migration and protocol field.
0051_session_questions.sqladds a column for the open question, and the session types infctl-protogain an optionalquestion, so older hosts and agents keep working without it.fctl review's first look at
725e138· 40 files, +1236 −132 · Review agent settings