Context
#10272 highlighted that A2A PR reviews suffer from quadratic token scaling because get_conversation fetches the entire thread every time. We agreed exact-match fetching is needed to solve this.
The Problem
The read-path for PR conversations currently lacks selective fetch. Agents must parse the full history to find new comments, wasting context tokens.
The Architectural Reality
The get_conversation tool in ai/mcp/server/github-workflow/ uses the gh CLI. GitHub's REST API supports per-ID fetch, but our wrapper doesn't expose it.
The Fix
Add optional comment_id, since_comment_id, and last_n parameters to get_conversation with proper precedence (comment_id > since_comment_id > last_n > full).
Acceptance Criteria
Out of Scope
New tools like get_comment and list_comments are explicitly out of scope to respect the tool-surface cap.
Related
Origin: #10272
Origin Session ID: 0b29a8fa-c6b0-42e2-ab3b-8015a99db2d8
Retrieval Hint: "selective fetch since_comment_id get_conversation a2a"
Context
#10272highlighted that A2A PR reviews suffer from quadratic token scaling becauseget_conversationfetches the entire thread every time. We agreed exact-match fetching is needed to solve this.The Problem
The read-path for PR conversations currently lacks selective fetch. Agents must parse the full history to find new comments, wasting context tokens.
The Architectural Reality
The
get_conversationtool inai/mcp/server/github-workflow/uses theghCLI. GitHub's REST API supports per-ID fetch, but our wrapper doesn't expose it.The Fix
Add optional
comment_id,since_comment_id, andlast_nparameters toget_conversationwith proper precedence (comment_id>since_comment_id>last_n> full).Acceptance Criteria
get_conversationacceptscomment_id,since_comment_id,last_noptional parameters.Out of Scope
New tools like
get_commentandlist_commentsare explicitly out of scope to respect the tool-surface cap.Related
Origin:
#10272Origin Session ID:
0b29a8fa-c6b0-42e2-ab3b-8015a99db2d8Retrieval Hint:"selective fetch since_comment_id get_conversation a2a"