Repository navigation
fix(coderd/x/chatd): tell parent agents never to ask for a secret answer in chat - #162
Conversation
|
@codex review
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Follow-up to #153. Part of #73.
The paired #153 check on daily found a way for a secret to leak. While a child chat waited for a secret answer, the root model told the user to paste the token into the chat. A value sent that way reaches the model, which the secret answer route exists to prevent.
The cause was the text the parent model gets. The secret note in
wait_agentand themessage_agentrefusal said only that the user gives the value "in the root chat", and the model read that as the chat composer.What changes
wait_agentnote: for a child with a pending secret question, the note now says the user enters the value in the question panel above the root chat's input, which keeps it out of every model's context. It also tells the model never to ask for the value as a chat message or for itself.message_agentrefusal: the error for a message to that child now names the same panel and gives the same instruction.Only these two strings change. The secret answer route, the stored answers and the UI are unchanged.
Validation
go vetandgofmtare clean on./coderd/x/chatd/.TestDescendantQuestionWaitAgent,TestDescendantSecretQuestion,TestSecretAnswer*andTestSecretQuestionRefusesSubagentMessagepass. They check thatwait_agentreturns the secret note and that themessage_agentrefusal holds.258bec6e56, as a member user withfork-nested-subagentson and a model. A root chat spawned a child that asked a secret question, then calledwait_agent.wait_agentresult carried the new note.message_agentcall to the waiting child returned the new refusal text.executereported the expected sha256.chat_secret_answers.value(1 row), 0 times inserver.log, and 0 times in the root's message dumps.