feat(github): replace hardcoded agent messages with LLM-generated ack messages#490
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 22, 2026
Merged
Conversation
… messages
GitHub agents had hardcoded initial messages in three places: headerMessage
in agent definitions, preExecute in Claude Code profiles, and
postAcknowledgmentComment in the webhook handler. Meanwhile, the router
already had a working LLM ack mechanism that generated contextual messages.
In router+worker mode this created duplicate comments — one LLM-generated
ack from the router, then a second hardcoded one from the agent.
This change makes the LLM-generated ack the single initial message for all
GitHub agents by plumbing ackMessage through the entire pipeline (queue,
worker, webhook handler, agent execution) and teaching agents to reuse
pre-existing ack comments instead of posting new ones.
Key changes:
- Add ackMessage field to AgentInput, GitHubJob, and webhook queue
- tryPostGitHubAck now returns { commentId, message } instead of just number
- postAcknowledgmentComment handles all GitHub agent types (not just
respond-to-review/respond-to-pr-comment) using generateAckMessage()
- executeGitHubAgent resolves effective header: ackMessage > INITIAL_MESSAGES
> definition.headerMessage, and reuses ack comment when ackCommentId exists
- Remove hardcoded headerMessage from review, respond-to-review,
respond-to-pr-comment, respond-to-ci agent definitions
- Claude Code profile preExecute hooks skip when ackCommentId exists
- Remove acknowledgmentCommentId from PRResponseAgentInput (unified to
ackCommentId on AgentInput)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
generateAckMessage()) are now THE initial comment for all GitHub agents, eliminating duplicate comments in router+worker modeackMessagethrough the entire pipeline: queue → worker → webhook handler → agent execution, alongside the existingackCommentIdpostAcknowledgmentComment()now handles review, respond-to-ci, etc. — not just respond-to-review/respond-to-pr-commentackCommentIdis present, agents skip posting a new comment and instead record the existing one for progress updatesheaderMessagefrom all 4 GitHub agent definitions;INITIAL_MESSAGESserves as the static fallbackPRResponseAgentInput: removedacknowledgmentCommentIdfield (unified toackCommentIdonAgentInput)Files changed (19)
src/types/index.ts,src/router/queue.tsackMessagefieldsrc/router/github.tstryPostGitHubAckreturns{ commentId, message }src/worker-entry.tsackMessagethroughsrc/utils/webhookQueue.ts,src/triggers/shared/webhook-queue.tsackMessagesrc/triggers/github/webhook-handler.tsgenerateAckMessage()src/agents/shared/githubAgent.tssrc/agents/shared/prResponseAgent.tsacknowledgmentCommentIdsrc/agents/review.ts,respond-to-review.ts,respond-to-pr-comment.ts,respond-to-ci.tsheaderMessagesrc/backends/agent-profiles.tspreExecuteskips when ack exists, usesackMessageTest plan
npm run typecheck— cleannpm run lint— clean (only 1 pre-existing warning)npm test— all 2614 tests pass (14 new)tryPostGitHubAckreturn type, ack message on queued jobs,preExecuteskip when ack exists,preExecuteusesackMessagefallback,ackMessagequeue forwarding🤖 Generated with Claude Code