Skip to content

feat(server): remind the agent of open chat comments on every turn - #353

Merged
bk-agent-01 merged 2 commits into
stagefrom
feat/thread-comments-open-reminder
Oct 26, 2026
Merged

bk-agent-01 merged 2 commits into
stagefrom
feat/thread-comments-open-reminder

Conversation

@bk-agent-01

Copy link
Copy Markdown
Collaborator

Problem

An open chat comment goes to the agent in full once, with the next turn. After that the agent hears nothing about it. When the user sends a new request, the agent works on that request and forgets the comments that it did not mark addressed.

What changed

Each new provider turn now looks at the thread's open comments in two groups (ThreadCommentsService.deliveryState, one read, same cost as before):

Case What the agent gets with the user's message
No open comments Nothing (unchanged)
New, edited, replied or reopened comment (unsent) The full <open_chat_comments> block, as today, then marked sent
Sent comment that is still open (agent did not mark it addressed) A short <open_chat_comments_reminder> (about 500 chars): the comment numbers, "keep working toward resolving them", call t3_reply_comment with addressed=true, call t3_list_comments to read them again
Both The full block for the new ones, then the reminder for the old ones ("in addition to the new comments above")
Comment addressed by the agent No reminder: it waits on the user to resolve
Delivery paused Nothing, as today
Full block does not fit the input limit The reminder still goes if it fits; the new comments stay unsent for the next turn
/compact Nothing (unchanged)

The reminder never marks anything sent, and it lists at most 20 numbers ("#20 and 5 more").

All changes are in fork-owned files (apps/server/src/threadcomments/, the fork ws handler test, docs/user/chat-comments.md). No upstream file changes.

How I tested

  • Focused tests in turnContext.test.ts (reminder only, block plus reminder, reminder when the block does not fit, number cap, tag defusing) and ThreadCommentsService.test.ts (deliveryState split and pause).
  • Tests not run on dev-server-1 (shared host rule); CI runs them on this PR.

🤖 Generated with Claude Code

A chat comment went to the agent in full once and was then never mentioned
again, so an agent that moved on to the next request forgot comments it had
not addressed. Every later turn now carries a short reminder that lists the
sent-but-open comments by number and points at t3_list_comments and
t3_reply_comment. New, edited, replied or reopened comments still go in full;
addressed comments and paused threads get no reminder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bk-agent-01
bk-agent-01 merged commit 2da7373 into stage Oct 26, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant