search_issues agent strips punctuation from quoted phrases

Open
#2,212 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
ai, search

Research direction

Start with the search_issues path in search-issues.ts (around lines 195-244, where the query goes to Seer or the embedded agent) and the agent prompt in support/search-issues/config.ts (lines 11 and 25). Check whether a quoted phrase containing parentheses survives the agent's rewrite, and how rewriteSearchQuery treats it. Done means a quoted phrase like "organization step(s) failed" is passed through unchanged, or any rewrite is reported in the result notes.

Written by the indexing model from the issue text.

Description

Through the embedded repair agent, search_issues can rewrite a quoted literal phrase. In MCP-SERVER-GPC (opencode, server 0.42.0), "organization step(s) failed" was reported to run as organization step failed. It returned nothing, though a matching issue existed (a search for organization found it).

  • Not verified from telemetry: the failing call isn't in the sampled spans, and the feedback trace is unsampled. The call path below comes from code and from the same caller's other calls.
  • The deterministic rewrite keeps the phrase: rewriteSearchQuery('"organization step(s) failed"', { issueSearch: true }) returns it unchanged with no notes. A quoted phrase alone isn't structured syntax (looksLikeSentrySearchSyntax → false), so it goes to Seer or the agent (search-issues.ts:195-244).
  • This org uses the agent path: the same user and org's earlier quoted search_issues call (trace e90e6dd4…, 2026-11-10, "timeout of 20000ms exceeded") shows the org feature-flag GET and then callEmbeddedAgent, with no Seer translate call. That run kept the quotes, so the rewrite seems tied to the punctuation.
  • Likely trigger (inference): the agent prompt counts only field:value forms as explicit tokens (support/search-issues/config.ts:11), so a quoted free-text phrase is natural language that the agent may rewrite. It also says parentheses are "invalid in issue search even when written explicitly" (config.ts:25), which doesn't separate grouping parens from literal characters inside a quoted phrase.
  • The rewrite is silent: the result's notes only include rewrites from rewriteIssueQuery (search-issues.ts:282-289). An agent rewrite shows up only as the changed executedSearch.query, and the explanation only appears with includeExplanation.

Related: the same feedback's search_logs part (unknown attribute with no suggestions) is in #2211.

via Sentry.

--

View Session [Sentry]

Dominant language
TypeScript
Stars
961
Forks
179
Avg merge
15h 33m
Merged PRs (30d)
476

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/toolkit

All issues in getsentry/toolkit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.