Repository navigation
Take back restores the person's words, not the body the agent reads - #3738
Merged
Merged
Conversation
The reply draft a Take back fills held the stored body: the still-open sentence the store writes for the agent, the skills block the Send adds, the quote's lead, and a PR page's details on a thread's first message. Sent again, the agent read the still-open sentence twice. The draft now holds the words as the thread view draws them; a quote comes back as the draft's quote. A live review comment taken back drops the sentence too. What is stored and what agents receive are unchanged.
…raft A thread's first message from a PR page comes back with the PR's details after the words, so sent again it is that PR's thread again. A reply whose words were only the store's sentence leaves a kept draft as it was. Tests cover the owner's case (an earlier answer, one question still open). The live review posts a person's reply to the forge without the Inbox's sentence for the agent.
backnotprop
marked this pull request as ready for review
November 23, 2026 02:49
1 task
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.
What was wrong
When a reply that answered no question was taken back while a question was open, the reply box came back with the person's words and an agent-only sentence ("No new answers in this reply; 1 question is still open. Don't re-ask it; the person will answer in the Inbox."). Take back copied the stored body, and that body is written for the agent. If the person sent it again unedited, the agent read the sentence twice.
Fix
packages/server/inbox-take-back.tsnow restores the words the thread view shows:splitInboxReplyBody, the same function the thread view uses.$skill//skillwords stay in the text, which is how the composer stores a skill, so the next Send adds the block again.A live review comment taken back (
packages/review-editor/live/model.ts,commentOfMessage) restoredmessage.bodytoo. It now drops the still-open sentence as well. The PR comment that Post builds (threadForgeText) also took the person's replies raw: a reply to an agent message with a question open would have posted the agent-only sentence to the forge. It now posts the person's words only.What is stored and what agents receive do not change. Take back exists only in the Inbox, which is Bun-only, so there is no Pi twin. The wire does not change.
Tests
packages/server/inbox-take-back.test.ts(starts an Inbox, so it runs in CI only):linkInboxPullsties it to the PR again;packages/review-editor/live/model.test.ts: the comment's text comes back without the sentence, and the forge text has the person's words only. I ran both locally: they fail with main'smodel.tsand pass with this change.