[BUG] Routines: GitHub MCP search_issues returns total_count 0 for any free-text term in a private repo (qualifier-only queries work)
Summary
In a scheduled routine (Claude Code on the web), the built-in GitHub MCP tool mcp__github__search_issues returns {"total_count":0,"incomplete_results":false,"items":[]} whenever the query contains a free-text term, even though matching issues exist in the repository. Queries that use only qualifiers (e.g. is:open, label:...) return the correct results. No error is raised, so an agent reads "0 results" as "nothing matches".
The same queries return the expected results locally with gh api search/issues (personal OAuth token).
Environment
- Surface: Claude Code routines (scheduled cloud agent), environment "Default", model claude-sonnet-5
- Repository: a private repository owned by a personal account, added as a source of the routine (the Claude GitHub App has access;
list_issuesandissue_readwork) - Date observed: 2026-09-23
Steps to reproduce
Run a routine that calls search_issues sequentially (one call at a time) with owner/repo set to the private repository:
| query | routine (search_issues) | local (gh api search/issues, same repo) |
|---|---|---|
| is:open | 89 | 89 |
| is:open label:<label> | 4 | 4 |
| is:open conhost | 0 | 2 |
| is:open Opus | 0 | 3 |
| is:open Grok | 0 | 5 |
| is:open ConoHa | 0 | 9 |
| is:open Playwright | 0 | 6 |
| is:open Notion | 0 | 9 |
| repo:<owner>/<repo> is:issue is:open "2026-09-24" in:body | 0 | 3 |
Additional observations:
- An issue returned by the
is:openquery contained the wordBlogBotInventoryin its body, but searching forBlogBotInventorydid not return that issue. - Quoting, removing quotes, adding or removing
in:body, and passing or omitting theowner/repoarguments made no difference. - In one run where the calls were made in parallel, a few free-text queries returned 1 result instead of 0; with sequential calls, all free-text queries returned 0.
Expected
Free-text queries return the same matches as the REST search API does for the repository owner (as with gh).
Actual
Free-text queries return total_count: 0 without an error. Qualifier-only queries are correct.
Possibly related
- The official
github-mcp-servercallsGET /search/issueswithis:issue repo:owner/repoprepended, which is the same requestghmakes, so the difference seems to be the credential (Claude GitHub App vs. personal token). - A similar symptom has been reported for code search with GitHub App tokens on private repositories: https://github.com/orgs/community/discussions/113651 (that report is about
/search/code, so I have not confirmed that it is the same cause).
Impact / workaround
A routine that narrowed candidates with a date search silently missed issues. We switched to list_issues (fetching all open issues) and filtering locally, which works but is much heavier.