Repository navigation
Closed
Description
Xum created this issue on behalf of @ibetitsmike.
Part of #4. Moved here from W2's brief (#8, item 6) when the UI wave started.
W8 · Descendant questions · mike/descendant-questions
Task. R8.2: any descendant chat (child, grandchild) can ask the user a structured question, and the question surfaces in the root chat's UI. R8.3: a question can ask for a secret answer that never lands in chat history.
Background (verified on main e155b42 by W2).
- R8.1 is upstream:
turn_environment.go:724-730offersask_user_questionon root UI chats, async outside plan mode and blocking in plan mode. Answers are ordinary user messages whose first line names the call (askUserQuestionState.ts). - Descendants never get the tool:
turn_environment.go:2059returnsisRootChat. askuserquestion.gohas nosecretfield.
Decisions (lead, 2026-11-09).
- A descendant question blocks the child: the child's turn stops until answered, and the parent's
wait_agentreports that the child needs input. - W8 owns both server and UI.
- R8.3 store: a dbcrypt-encrypted, single-use chatd row, consumed and deleted by the child's next turn, delivered as an ephemeral prompt message. History records only "answer delivered (secret)". Send the lead a short design note before writing R8.3 code: data flow, what is persisted where, behavior when dbcrypt is not configured, and multi-replica delivery.
Scope.
- Server: a fork question tool on descendants through
appendForkTools; a forkdb record of pending descendant questions; a fork route that lists a family's pending questions; the answer goes to the child through the existing send-message API as the async answer message;wait_agentreports needs-input. - UI: a "Question from " card docked in the root chat (reuse upstream's question dock and
QuestionStep), naming the asking chat and linking to it; answering resumes the child. - R8.3 server: secret flag on the question, the single-use encrypted row, consumption on the next turn, redaction everywhere (chat messages,
read_chat_transcript, logs, audit). - R8.3 UI: masked input in
QuestionStepfor secret questions, and a "secret delivered" history entry.
Acceptance.
- A grandchild asks; the root UI shows the card with the asking chat; the user answers; the grandchild resumes with the answer and finishes; meanwhile the coordinator's
wait_agentshowed needs-input. - A secret answer never appears in
chat_messages,read_chat_transcript, server logs or the UI history; only "answer delivered (secret)" does. - With the experiment off, descendants have no question tool and the UI matches upstream.
Constraints. Experiment fork-nested-subagents. Masking the model's own later output is out of scope.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ibetitsmike commentedon Nov 10, 2026
W8 status: opened #86 (PR1, the chatd descendant ask_user_question), head bca159a. Codex review and fork-ci are pending.
ibetitsmike commentedon Nov 10, 2026
W8: sent READY for #86 at
01f9c60dbf(fork-ci green, 0 unresolved threads, UAT PASS). TwoARCHITECTURE.mdTODO lines need the owner.ibetitsmike commentedon Nov 10, 2026
W8 status: #86 (descendant
ask_user_questiontool +wait_agentneeds_input) is READY again at97834de11f. Main is merged in, and Codex r5 raised two findings, both fixed: a replaced question now ends the wait at the next poll, and clearing a chat retires its pending question. Codex r6 is clean, fork-ci is green, and 0 threads are open. Next: PR2 (pending-questions list route) opens after #86 merges. PR3 (question dock UI) is in implementation.ibetitsmike commentedon Nov 10, 2026
W8 status: #86 is READY at
a81edc7fdc. Main is merged in (the #82 conflicts were registration-only), and a focused UAT on the fixed head passed: evidence. Codex r7 is clean, fork-ci is green, and 0 threads are open. PR2 opens after #86 merges.ibetitsmike commentedon Nov 10, 2026
W8 status: #86 merged as
96d44ec463(heada81edc7fdc). PR2, the family question list route, opens next against main6ae89b1c7f.ibetitsmike commentedon Nov 10, 2026
W8 status: PR2 is open as #114 (family question list route), at
8b0b2ebea2on main6ae89b1c7f. Codex and fork-ci are running, and a UAT follows.ibetitsmike commentedon Nov 10, 2026
W8 status: #114 is READY at
ce5e02182d. CI run 42770424752 passed, Codex found no issues on this head, no review threads are open, and UAT round 2 passed (see the UAT comment on #114). The next PR, the root-page question dock, has passed UAT on all 5 scenarios and opens once #114 merges.ibetitsmike commentedon Nov 10, 2026
PR3 (the root-chat question dock) is open as #118, head
d1cad80384, with base main. UAT on76d3d0752fpassed S1-S5, and the head only merges main into it. Codex review requested.ibetitsmike commentedon Nov 10, 2026
PR4 of R8.3 (secret answers: storage, the secret-answer route, and the guard on the normal answer path;
secretstays out of the model schema) is open as #119, head41126c17d3. Codex review requested; dev-build UAT follows when ops gives a FULL slot.ibetitsmike commentedon Nov 10, 2026
The rest of R8.3's server side is open as two stacked PRs. They are split to stay under about 500 lines each:
f816d061a3): secret answers expire after 24 hours. Reads skip older answers, and dbpurge deletes them.86450a3344):execute,write_fileandedit_filesget the value in place of{{secret:<call_id>}}, and every tool response shows the placeholder instead of the value. Thesecretschema flag stays off.The masked input in the root dock, which turns the flag on, is now PR7. Targeted tests and negative controls pass on both heads. fork-ci runs only on PRs into
main, so CI runs after the PRs below them merge. Codex reviews them on open. UAT for #126 follows in a server UAT slot.ibetitsmike commentedon Nov 10, 2026
#118 (R8 PR3, the root-page dock for descendant questions) is ready for review at
808a20572d. Codex's latest review of that commit found no issues, fork-ci is green, and every review thread is resolved.ibetitsmike commentedon Nov 10, 2026
#118 (R8 PR3, the root-page dock for descendant questions) is merged into main as
8f7fdb0b23. #119 now targets main. I'm merging main into the #119/#125/#126 stack before pushing their review fixes.ibetitsmike commentedon Nov 10, 2026
The R8.3 secret-answer hardening PR is open as #136, head
8cab4881e6, stacked between #126 and PR7. It refuses secret questions in computer-use chats, scrubs cut-off fragments of a value, withholds media from wrapped tools while answers are active, and passes the value toexecutethrough a shell variable, so the shell never runs it as code. It also refusesmessage_agentand wake-ups to a child that waits for a secret answer. Tests pass, and each of 7 negative controls fails as expected. Codex review is requested. PR7 is not READY until #136 merges.ibetitsmike commentedon Nov 10, 2026
W8 status: #119 is READY at
c5b742296b.cbff12ee9c(see the PR body). The only change since then is the keyset paging in the dbcrypt recrypt.TestChatSecretAnswersKeyCommandscovers that change, and it passes on this head.#125, #126 and #136 stack on #119 and are in Codex review.
ibetitsmike commentedon Nov 10, 2026
W8 status: #125 is READY at
9ab5356a2f. It stacks on #119.main, so feat(coderd): expire chat secret answers after 24 hours #125 gets CI once feat: accept secret answers to descendant questions outside chat messages #119 merges. On this head, gofmt,go vetand the coderd secret answer tests pass. The negative control for the latest fix fails, as it should.cbff12ee9c(see the PR body). Since then, the only route change is the fix for the last Codex finding: replacing an expired answer that is still queued sends no second report.TestForkChatSecretAnswerExpiredcovers it.ibetitsmike commentedon Nov 10, 2026
W8 status: #126 is READY at
308db86655. It stacks on #125.secretflag on. One finding, base64 exfiltration by a shell command, was declined because the threat model covers accidental exposure only, and the lead confirmed that call.main, so feat(coderd): give descendant tools secret answers without showing them to the model #126 gets CI once the PRs below it merge. On this head, the coderd secret answer tests pass.5a8382e4b(see the PR body). The flag stays off in feat(coderd): give descendant tools secret answers without showing them to the model #126, so no chat can have a secret question.#136 is in Codex review.
ibetitsmike commentedon Nov 10, 2026
W8 status: #119 is merged into
mainas3036142c68.main. I mergedmaininto it, so its head isa696b95118. The merge changes none of feat(coderd): expire chat secret answers after 24 hours #125's own diff, and fork-ci runs on it next.6a414e9f9fafter a forward merge. Its diff is unchanged.c64935b9ee.ibetitsmike commentedon Nov 10, 2026
W8 status: #125 is READY at
a696b95118, now based onmainafter #119 merged.3036142c68) into the branch and resolves 11 conflicts.3036142c68: https://github.com/ibetitsmike/coder/actions/runs/42817447192. Since then, main gained only docs: map wake-ups and worktree binding in the pstack adapter #139 (1be1a17a96), which changes docs only.ibetitsmike commentedon Nov 10, 2026
W8 status: #125 merged as
ad1010782c. #126 is next. It now targetsmainand gets the forward merge, fork-ci and a Codex pass on its new head.ibetitsmike commentedon Nov 10, 2026
W8 status: #126 is READY at
a38ee99870, now based onmainafter #125 merged.ad1010782c: https://github.com/ibetitsmike/coder/actions/runs/42823136711. The first attempt failed only on the known flakyTestRunnerManager_HeartbeatDoesNotReviveStaleLease(test(coderd/x/chatd): fix flaky TestRunnerManager_HeartbeatDoesNotReviveStaleLease #61), a test this PR doesn't touch. The rerun of that job passed.77b20734d2). It merges cleanly with this head; the only file both change iscoderd/x/chatd/ARCHITECTURE.md.5a8382e4b(see the PR body) stands. The flag stays off in feat(coderd): give descendant tools secret answers without showing them to the model #126.ibetitsmike commentedon Nov 10, 2026
W8 status: #126 merged as
df22c722f3. #136 is next. It now targetsmainand gets the forward merge, fork-ci and a Codex pass on its new head.ibetitsmike commentedon Nov 10, 2026
W8 status: #136 is READY at
8f3752a9ca, based onmainatdf22c722f3(#126 merged).5a8382e4bstands, plus targeted tests and negative controls on this head. The flag stays off in fix(coderd/x/chatd): keep secret answers out of shell code, media and fragments #136. The full secret flow UAT runs on PR7, which turns the flag on.ibetitsmike commentedon Nov 10, 2026
#136 (secret answer hardening) is merged into main as
af6e27501e. Next is PR7, which turns thesecretflag ofask_user_questionon. It opens against main, and its READY waits on a full secret flow UAT on a branch server.ibetitsmike commentedon Nov 10, 2026
W8 status: PR7 is open as #153 against main. It turns on secret questions for descendant chats: the masked answer field in the root chat dock, and a secret question that only its answer message retires. Go tests pass on its head
4445019574. Next: the frontend review, Codex, fork-ci, and a full secret flow UAT on a branch server on 3200.ibetitsmike commentedon Nov 10, 2026
Status: #153 (secret questions on) is READY at 4809559: fork-ci green, Codex clean, 0 unresolved threads, UAT PASS (5ed0bce, 23b0596), and tests cover the later commits.
ibetitsmike commentedon Nov 10, 2026
Status: #153 merged as dfc24a4. The W8 code stack is complete on main.
Merged: #86 (descendant
ask_user_question,wait_agentneeds_input), #114 (family questions route), #118 (root question dock), #119 (secret answer route and store), #126 (secret substitution and scrub), #153 (secret questions end to end).Next:
ibetitsmike commentedon Nov 10, 2026
Closing. The paired #153 live check passed on daily at
df1ef73ac6, which contains the #153 merge (#153 (comment)). A member user ran a root chat and a child chat.{{secret:<id>}}instruction.server.log, from every database text column exceptchat_secret_answers.value, and from the page HTML and browser storage.The lead accepted these differences from the spec above:
Follow-up: the check found that the root model may tell the user to paste the secret into the chat. A small PR will tighten the text the root model sees.