search_issues can't see an issue created seconds ago, so the "search before creating" guidance leads to duplicates on retry
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 78/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github, go
調査の方向性
pkg/github/toolset_instructions.goのissueに関するガイダンスと、pkg/github/issues.goのsearch_issuesの説明から始め、リポジトリのコントリビューション手順で、指定されたskillとsnapshotの更新を確認してください。新しく作成されたissueが反映されるまでの遅延を説明し、作成に失敗した場合やタイムアウトした場合はlist_issuesを使うようエージェントに案内する文言に更新してください。ガイダンスと指定されたsnapshotにこの動作が反映されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The issues toolset tells agents: "Use 'search_issues' before creating new issues to avoid duplicates." That works for issues that have been around for a while. It doesn't work for an issue the agent has just created. When the reply to an issue_write create is lost, for example to a timeout or a dropped connection, the issue exists but the agent doesn't know that. It follows the guidance and searches, the new issue isn't in the results yet, and it creates the issue again.
In my measurements search_issues took 2 to 10 seconds to show a new issue, while list_issues showed it in the first call every time.
This is related to #3188 but it isn't the same problem. There, keyword queries miss issues that have existed for a long time. Here the query does find the issue, a few seconds late, and GitHub's REST keyword search was late by the same amount. So sending these queries to keyword search, as #3265 does, wouldn't remove the delay.
Affected version
GitHub MCP Server
Version: 2.1.0
Commit: 4bcdcdf8d7beee98c9448e73e257308280924cc4
Build Date: 2026-11-03T10:54:04Z
Installed with Homebrew and run as github-mcp-server stdio --toolsets=issues. I haven't timed 2.3.0, but at the v2.3.0 tag the guidance line is still in pkg/github/toolset_instructions.go and search_issues still defaults to semantic search on github.com (pkg/github/issues.go).
Steps to reproduce the behavior
No model is needed.
- Call
issue_writewithmethod: "create"and a unique title. - Straight away, call
search_issueswithrepo:OWNER/REPO "<that title>" in:title. The new issue is not in the results. - Call
list_issuesfor the same repository withorderBy: "CREATED_AT"anddirection: "DESC". The new issue is there. - Keep calling
search_issues. The issue appears a few seconds later.
I timed this in a private test repository, 11 rounds on 2026-11-23 and 5 on 2026-11-25:
list_issueshad the new issue in its first call, sent right after the create returned, in 16 of 16 rounds.search_issuesanswered its first call in 13 rounds and never had the issue in it. It first showed the issue 2 to 10 seconds after the create.- In the last 5 rounds I also sent the same query to GitHub's REST search (
GET /search/issueswith nosearch_type, which is the keyword index). It missed the issue and then found it in the same polls assearch_issues, 4 to 7 seconds after the create.
In the other 3 rounds my script's polling had used up the search limit, and the first calls were refused with 403 API rate limit of 10 still exceeded. An agent that polls search to wait for its issue would hit the same limit.
To see what a model does with this, I used a fault-injection proxy I'm building (https://github.com/1SS28/faultline) to drop the reply to the first issue_write call after the write had landed. In 23 trials on 2026-11-13, the outcome followed the read tool the model used before writing again:
| What the model did after the failed call | Trials | Ended with a duplicate |
|---|---|---|
Checked with list_issues |
7 | 0 |
Checked with search_issues only |
15 | 14 |
| Retried without checking | 1 | 1 |
Claude Sonnet 5.5 checked with list_issues in all 3 of its trials. Claude Haiku 5.5 did in 4 of 20, and 15 of its 20 trials ended with a duplicate: 9 of 10 with the server's instructions passed to the model and 6 of 10 without them, which is too few trials to say the instructions made the difference. In all 14 search-only failures the model's final answer said it had checked before retrying, and none reported the second issue.
The proxy returned the failure the moment the write landed, and every retry came within 6 seconds of it. That is the worst case: a timeout that fires after 30 seconds gives search time to catch up.
Expected vs actual behavior
Expected: an agent that follows the server's guidance after a lost reply finds the issue it just created and doesn't create it again.
Actual: the check the guidance points to can't see that issue for several seconds, so following the guidance produces the duplicate.
Suggested change
The existing sentence is right for older issues, so I'd keep it and add one:
Use 'search_issues' before creating new issues to avoid duplicates. Search can take several seconds to include a newly created issue, so after an 'issue_write' create that failed or timed out, check 'list_issues' sorted by creation date before creating it again.
A note in the search_issues description that results may not include issues created in the last few seconds would help too.
I can open a pull request for the wording, with the skill and snapshot updates CONTRIBUTING asks for, if you'd take it.
Logs
403 API rate limit of 10 still exceeded until 2026-11-23 10:58:49 -0500 EST, not making remote request. [rate reset in 6s]
- 主要言語
- Go
- スター
- 34.8k
- フォーク
- 5.4k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 34
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/github-mcp-server のほかの issue
-
`create_branch` returns a bare 404 when the token has no push access対応中かも @aloneangel45 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/github-mcp-server#3994 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/github-mcp-server#3992 ·
メンテナーはふだん 2 日以内に返信
-
list_issues and search_issues: inconsistent `fields` allow-lists (`html_url` rejected by list)対応中かも @sarankumar1325 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
github/github-mcp-server#3960 ·
メンテナーはふだん 2 日以内に返信
-
Scope-challenge middleware fails open when the token-scope fetch returns an error対応中かも @Shanmukh-l33t が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/github-mcp-server#3929 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
ListLabelsOutput drops every label id from the typed response対応中かも @Shanmukh-l33t が 8 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
github/github-mcp-server#3923 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
github/github-mcp-server の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
agent-in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jordansmall/spindrift#7716 ·
メンテナーはふだん 1 日以内に返信
-
bug 🪲 needs-triage :mag:
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Azure/azure-service-operator#5880 ·
メンテナーはふだん 1 日以内に返信
-
needs-type
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Add rebaseWhen: conflicted to major Go module Renovate updates対応中かも @WadekarPrashant が今日担当しました。 オープンenhancement feature good first issue ready-for-triage triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
konflux-ci/build-definitions#3943 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信