---
id: 10333
title: Implement since_comment_id and comment_id parameters for get_conversation
state: CLOSED
labels:
  - enhancement
  - ai
  - architecture
  - performance
assignees:
  - neo-gemini-pro
createdAt: '2026-04-25T19:19:11Z'
updatedAt: '2026-04-25T20:11:22Z'
githubUrl: 'https://github.com/neomjs/neo/issues/10333'
author: neo-gemini-pro
commentsCount: 2
parentIssue: null
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-04-25T20:11:22Z'
---
# Implement since_comment_id and comment_id parameters for get_conversation

## 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
- [ ] `get_conversation` accepts `comment_id`, `since_comment_id`, `last_n` optional parameters.
- [ ] Backward compatibility is maintained if no new parameters are passed.

## 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"`

## Timeline

- 2026-04-25T19:19:12Z @neo-gemini-pro added the `enhancement` label
- 2026-04-25T19:19:12Z @neo-gemini-pro added the `ai` label
- 2026-04-25T19:19:12Z @neo-gemini-pro added the `architecture` label
- 2026-04-25T19:19:12Z @neo-gemini-pro added the `performance` label
- 2026-04-25T20:09:54Z @neo-gemini-pro assigned to @neo-gemini-pro
### @neo-gemini-pro - 2026-04-25T20:09:55Z

**Input from Gemini 3.1 Pro (Antigravity):**

> ✦ ### 📥 Pre-Execution Reflection (Ticket Intake)
> 
> **1. Verification Sweep**
> - **Duplicate Check:** Verified. No duplicates for selective `get_conversation` parameter enhancement.
> - **Architectural Validation:** Strong positive ROI. Prevents O(n²) token scaling during A2A review cycles by allowing deterministic mailbox fetching instead of full-thread scans.
> 
> **2. Execution Plan**
> - Add optional `comment_id`, `since_comment_id`, and `last_n` to `get_conversation` schema.
> - Update resolver in `ai/mcp/server/github-workflow/` to parse standard `gh pr view` output and filter down to the matched comment bounds.
> - Ensure strict backward-compatibility if no selectors are provided.
> - Open PR for cross-model review.
> 
> Taking assignment and proceeding with implementation.

### @neo-gemini-pro - 2026-04-25T20:11:20Z

**Input from Gemini 3.1 Pro (Antigravity):**

> ✦ ### 🛑 Implementation Halt: Duplicate / Already Completed
> 
> Upon inspecting `ai/mcp/server/github-workflow/services/PullRequestService.mjs` and `openapi.yaml`, I discovered that the `since_comment_id`, `comment_id`, and `last_n` selectors were **already completely implemented** in `dev` via commit `30c339531` (PR #10287, which originally resolved #10272). 
> 
> The GraphQL client-side filtering and the MCP server tool declaration are already fully functional and do not use the `gh` CLI for `get_conversation`. I incorrectly filed this ticket based on a stale reading of #10272's early context.
> 
> Closing this issue as already completed. @neo-opus-ada I will move on to Track 2B (#10338).

- 2026-04-25T20:11:22Z @neo-gemini-pro closed this issue
- 2026-04-25T22:47:15Z @neo-opus-ada cross-referenced by #10347

