Skip to content

[Improve] Show web follow-up context in GitHub replies - #870

Merged
daniel-lxs merged 4 commits into
developfrom
fix/github-web-follow-up-quote-3dsoje4c9wabp
Jul 29, 2026
Merged

[Improve] Show web follow-up context in GitHub replies#870
daniel-lxs merged 4 commits into
developfrom
fix/github-web-follow-up-quote-3dsoje4c9wabp

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Discord.

What changed

GitHub comment delivery now automatically prefixes the first reply after a web UI follow-up with the user's Markdown blockquote, matching Slack behavior.

Why this change was made

People following a pull request or issue need to see which web UI message the Roomote response addresses without relying on the agent to reproduce it.

Impact

The agent receives the original web prompt unchanged. The server adds and clears the pending quote only after a successful GitHub comment write, caps the quoted text at 280 characters, and excludes injected out-of-band context.

@roomote-roomote

roomote-roomote Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

2 issues outstanding. See task

  • packages/cloud-agents/src/server/github-message-instructions.ts:12 The prompt cannot reliably tell a web follow-up from a GitHub follow-up, because source: "web" is retained only as runtime/transcript metadata and is not added to the model-visible prompt. As a result, the agent may omit the quote for web messages (or quote GitHub messages), so this does not reliably deliver the stated behavior.
  • apps/web/src/trpc/commands/sandbox-session/index.ts:76 The prompt is interpolated into XML-like delimiters without escaping. A web message containing </web_ui_follow_up> closes the boundary early, so the remainder is no longer identified as the follow-up and can be omitted from the required GitHub quote. Escape delimiter text or use a representation that cannot be terminated by user input.
  • apps/api/src/handlers/tasks/manageSourceControl.ts:98 submit_pull_request_review accepts an optional body, but is excluded from shouldQuote. A web follow-up answered with a comment/request-changes review therefore omits the quote and leaves it pending; the next unrelated PR or issue comment then receives the stale quote. Include body-bearing review submissions in the quote-and-clear path.
  • apps/api/src/handlers/tasks/manageSourceControl.ts:104 The pending quote is read before the provider write and only cleared afterward. Concurrent comment requests can both read the same value and each prepend it, so one web follow-up can be quoted in multiple GitHub replies. Claim the quote atomically before delivery, with recovery if delivery fails.

Reviewed 6aaff4a

@roomote-roomote

roomote-roomote Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Reworked this as automatic delivery-time formatting in 6aaff4a. A successful web UI prompt stores the raw user message; the first GitHub comment write prepends and then clears its blockquote. No agent-authored quote instruction or <web_ui_follow_up> prompt boundary remains.

@daniel-lxs
daniel-lxs marked this pull request as ready for review July 28, 2026 20:50
@daniel-lxs
daniel-lxs merged commit d4c3802 into develop Jul 29, 2026
18 checks passed
@daniel-lxs
daniel-lxs deleted the fix/github-web-follow-up-quote-3dsoje4c9wabp branch July 29, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants