agent comments silently dropped past GitHub inline comment limit
Fixes review agents silently losing comments past GitHub's inline comment limits by batching and summarizing. Use when some agent comments never appear. Not for comments rejected with errors.
TL;DR
GitHub caps inline comments per review; the agent posted past the cap and the extras vanished silently. Batch comments into fewer, denser ones and summarize the remainder in the review body instead of posting hundreds.
Error
Agent posted 240 inline comments; PR shows 38 - the rest were silently dropped, no error returned.Steps
- Confirm the loss: count the agent's intended comments (logs) vs visible ones. Expected: a large gap with no errors.
- Consolidate: group comments by file and severity, keeping the highest-signal ones inline. Expected: the inline count fits comfortably under the limit.
- Move the rest into the review body as a summarized findings list. Expected: nothing is lost, just relocated.
- Add a pre-submit count check: if inline comments exceed the safe threshold, auto-summarize the overflow. Expected: future runs degrade gracefully.
When to use
- The agent intended more inline comments than appear on the PR.
- No errors were returned for the missing ones.
When not to use
- The API returned errors for the missing comments - fix the errors, not the batching.
- Comments are missing for another reason (wrong PR, wrong lines).
Tool compatibility
- GitHub pull-request review API.
- Any high-volume review agent.
Variant phrasings
Hitting the limit on huge PRs
Fewer, better comments also help human reviewers - treat the cap as a quality signal.
Rate limits instead of comment limits
Secondary rate limits return 403s; silent drops point at the comment cap.
Why it happens
The review API accepts more comments than it will persist per review, dropping the overflow without an error. An agent that posts one comment per finding blows past the cap on any sizable PR.
Edge cases
- The exact cap is undocumented and can change - keep the agent's threshold conservative.
- Summarized findings should link to files/lines so authors can still locate each issue.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_hi0VAsnfXwr83U9qAfz-4w