What happens
ask/chat (the two free-text Q&A commands) render their answer through buildPublicAgentCommandComment, which posts via createOrUpdateAgentCommandComment -- the SAME find-and-edit-in-place helper used for the main PR review panel (AGENT_COMMAND_COMMENT_MARKER === PR_PANEL_COMMENT_MARKER, src/github/comments.ts). Every other command sharing that marker (preflight, blockers, etc.) reasonably represents "the PR's current state," so one continuously-updated panel makes sense there. But ask/chat answer a SPECIFIC question at a point in time:
- A second
@gittensory chat question silently overwrites the first answer (and can overwrite the review verdict itself), so a contributor asking two questions loses the first answer entirely.
- The edited comment stays at its ORIGINAL position in the PR timeline (GitHub doesn't move an edited comment), which is typically wherever the review panel first posted -- not near the question that prompted the edit. A contributor scrolling to their own recent comment sees no reply anywhere nearby.
Confirmed live on #5051: a chat answer was posted successfully, but a second question overwrote it, and neither was ever visible near the asking comment.
Fix
ask/chat now post a fresh, standalone reply per invocation via createIssueComment (the same always-fresh pattern already used for approval/closure/pause/resume notices), instead of sharing the PR-panel slot.
- The reply links back to the specific triggering comment (
payload.comment.html_url, already present on the webhook payload) via a "Replying to [this comment]" line.
- Every other command's behavior (shared, continuously-updated panel) is unchanged.
- Also fixes a separate, smaller issue found in the same investigation:
generateChatQaAnswer now retries once when the local Ollama model returns a genuinely empty completion (confirmed happening live) before reporting empty_chat_answer; a thrown error (network/auth) is still never retried.
What happens
ask/chat(the two free-text Q&A commands) render their answer throughbuildPublicAgentCommandComment, which posts viacreateOrUpdateAgentCommandComment-- the SAME find-and-edit-in-place helper used for the main PR review panel (AGENT_COMMAND_COMMENT_MARKER === PR_PANEL_COMMENT_MARKER,src/github/comments.ts). Every other command sharing that marker (preflight, blockers, etc.) reasonably represents "the PR's current state," so one continuously-updated panel makes sense there. But ask/chat answer a SPECIFIC question at a point in time:@gittensory chatquestion silently overwrites the first answer (and can overwrite the review verdict itself), so a contributor asking two questions loses the first answer entirely.Confirmed live on #5051: a
chatanswer was posted successfully, but a second question overwrote it, and neither was ever visible near the asking comment.Fix
ask/chatnow post a fresh, standalone reply per invocation viacreateIssueComment(the same always-fresh pattern already used for approval/closure/pause/resume notices), instead of sharing the PR-panel slot.payload.comment.html_url, already present on the webhook payload) via a "Replying to [this comment]" line.generateChatQaAnswernow retries once when the local Ollama model returns a genuinely empty completion (confirmed happening live) before reportingempty_chat_answer; a thrown error (network/auth) is still never retried.