Skip to content

search_issues agent strips punctuation from quoted phrases #2212

Open

Description

@sentry-junior

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]

Activity

  1. linear-code commented on Nov 12, 2026

    @linear-code
  2. sentry-junior commented on Nov 24, 2026

    @sentry-junior
    ContributorAuthor

    Another report (report count: 2). MCP-SERVER-GVK, server 0.42.0, HTTP transport, 2026-11-24.

    • Report: search_issues with a quoted exact error message containing 2000 ms (an App Hanging title) failed with HTTP 400 invalid tag condition on tags[transaction.duration]: 2000.0 must be a string. A broader App Hanging query worked.
    • Same root cause, worse outcome: here the translator didn't just drop punctuation, it seems to have turned the literal 2000 ms inside the quotes into a transaction.duration filter. The caller's text has no transaction.duration, and rewriteIssueQuery (catalog/search-issues.ts:220) never adds one, so the filter likely came from Seer or the embedded agent (catalog/search-issues.ts:161-194). A quoted phrase alone isn't structured syntax, and the agent prompt only protects field:value tokens (support/search-issues/config.ts:11).
    • Not verified from telemetry: the failing call isn't in the sampled spans or logs. The same caller's earlier search_issues call that day (trace 10d783905a1d…) went through callEmbeddedAgent with no Seer call, so this org likely uses the agent path.
    • Why Sentry 400s instead of returning nothing: issue search inherits transaction.duration as a duration/numeric key from default_config (getsentry/sentry src/sentry/api/event_search.py:2112, src/sentry/issues/issue_search.py:62-66), so the value is parsed to a float. Errors have no such column, so it lands on tags[transaction.duration] and Snuba rejects the non-string value.
    • Fix direction: send a query that is only a quoted phrase to Sentry as is, skipping Seer and the agent, like fix(search-events): Run literal queries without Seer or the agent #1635 does for the events tools. That PR doesn't touch search_issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions