feat(search-issues): Support recommended sort#1161
Draft
roggenkemper wants to merge 1 commit into
Draft
Conversation
Add `recommended` (Sentry's prioritized ranking) to the search_issues tool sort enum, the embedded search-issues agent, and the listIssues API client. The issues API already accepts sort=recommended; the tools just didn't offer it, so an agent could not ask for Sentry's default prioritized ranking. Regenerated toolDefinitions.json is hand-synced to the schema change; CI generate-definitions will confirm. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dcramer
reviewed
Jul 16, 2026
dcramer
left a comment
Member
There was a problem hiding this comment.
I found one project-scoping inconsistency worth addressing.
| projectSlug?: string; | ||
| query?: string | null; | ||
| sortBy?: "user" | "freq" | "date" | "new"; | ||
| sortBy?: "user" | "freq" | "date" | "new" | "recommended"; |
Member
There was a problem hiding this comment.
P2: recommended will not use the feature-flagged v2 scorer when projectSlug is present. listIssues() switches to the deprecated project issues endpoint below, but Sentry's recommended → recommended_v2 mapping exists only in OrganizationGroupIndexEndpoint; ProjectGroupIndexEndpoint calls prep_search() directly. This makes the same sort behave differently for project-scoped requests. Could we use the organization issues endpoint for project-scoped searches too and pass a project filter/ID?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
recommended(Sentry's prioritized ranking) to thesearch_issuessort options — the tool enum, the embedded search-issues agent, and thelistIssuesAPI client. The issues API already acceptssort=recommended; the agent tooling just didn't expose it, so an agent couldn't ask for Sentry's default prioritized ranking.recommendedneeds no client-side flag: the endpoint accepts it unconditionally (mapping to the v2 scorer internally when the org has the experimental flag).toolDefinitions.jsonis hand-synced to the schema change; CIgenerate-definitionswill confirm it matches.