Skip to content

fix: restore thread id in get_review_comments response#2245

Open
omid-ant wants to merge 1 commit intogithub:mainfrom
omid-ant:fix/restore-review-thread-id
Open

fix: restore thread id in get_review_comments response#2245
omid-ant wants to merge 1 commit intogithub:mainfrom
omid-ant:fix/restore-review-thread-id

Conversation

@omid-ant
Copy link

@omid-ant omid-ant commented Mar 20, 2026

Summary

Restore the thread id field to MinimalReviewThread so that pull_request_review_write with method: resolve_thread / unresolve_thread is actually usable.

Why

#2062 dropped id from the minimized review-thread output, noting it was "not used for any subsequent tool call". While this was true at the time, #1919 later added resolve_thread / unresolve_thread, both of which require a thread node ID. The tool's own docstring reads:

Get thread IDs from pull_request_read with method get_review_comments.

…but that tool no longer returns them, so there's no way to resolve a thread without leaving the MCP server. This results in callers of this tool being unable to resolve threads through the resolve_thread tool.

The GraphQL query (reviewThreadNode in pkg/github/pullrequests.go) already fetches ID — it's just dropped during minimization.

Also see: #2229

What changed

  • Add ID string to MinimalReviewThread
  • Populate it in convertToMinimalReviewThread via fmt.Sprintf("%v", thread.ID)

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed — pull_request_read (get_review_comments) now includes id per thread
  • New tool added

Prompts tested (tool changes only)

Security / limits

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Docs

  • Not needed
  • Updated (README / docs / examples)

@omid-ant omid-ant marked this pull request as ready for review March 20, 2026 19:34
@omid-ant omid-ant requested a review from a team as a code owner March 20, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant