feat: prevent duplicate inline comments on same line #807
+366
−3
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
Fixes #731
This PR implements automatic deduplication of inline comments to prevent Claude from creating multiple separate comment threads on the same line during successive PR reviews.
Problem
When Claude Code Action reviews a PR multiple times (e.g., on each push via
synchronizedevent), it would create duplicate inline comment threads on the same line instead of consolidating feedback in existing threads. This resulted in cluttered PRs with multiple separate threads saying the same thing.Solution
Implemented auto-deduplication at the tool level:
Added
in_reply_toparameter tocreate_inline_commenttoolAutomatic duplicate prevention logic
Updated prompts
Changes
Files Modified
src/mcp/github-inline-comment-server.ts: Addedin_reply_toparameter and auto-deduplication logicsrc/create-prompt/index.ts: Updated prompt instructions for both default and simple modesHow It Works