Skip to content

fix(issues): advise checking list_issues after failed create due to search indexing lag - #3980

Open
tang-ontheway wants to merge 1 commit into
github:mainfrom
tang-ontheway:fix/issues-toolset-retry-guidance
Open

tang-ontheway wants to merge 1 commit into
github:mainfrom
tang-ontheway:fix/issues-toolset-retry-guidance

Conversation

@tang-ontheway

Copy link
Copy Markdown

Fixes #3973

Summary

search_issues (both semantic and lexical) can lag 2–10 seconds behind newly created issues, whereas list_issues sorted by CREATED_AT (DESC) reflects newly created issues immediately. When an issue_write (method: "create") response is lost to a timeout or dropped connection, following the existing "Use 'search_issues' before creating new issues to avoid duplicates" guidance alone misses the just-created issue and leads agents to create duplicates on retry.

This change:

  • Updates generateIssuesToolsetInstructions in pkg/github/toolset_instructions.go to advise checking list_issues sorted by creation date before retrying a failed or timed-out issue_write create.
  • Adds a brief indexing-lag note to searchIssuesSemanticDescription and searchIssuesLexicalDescription in pkg/github/issues.go (and updates pkg/http/server_test.go and tool snapshots).
  • Updates the bundled issue-authoring skill (pkg/skills/catalog/skills/issue-authoring/SKILL.md) and refreshes pkg/github/testdata/toolset-instructions.json.

Testing

  • go test ./pkg/github/... ./pkg/http/... ./pkg/skills/... — all passed
  • go test ./pkg/skills/catalog -run TestCatalogToolRequirementsAreRegistered -count=1 — passed
  • go test ./pkg/github -run TestToolsetInstructionsAreCoveredBySkills -count=1 — passed

@tang-ontheway
tang-ontheway requested a review from a team as a code owner November 28, 2026 13:44
Copilot AI adaptive review requested due to automatic review settings November 28, 2026 13:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human validation is needed because the guidance changes alter timeout/retry behavior and bundled-skill availability, including configurations where list_issues may be omitted, and automated review found the availability contract was not updated.

No open issues 🎉

What changed in this PR

Updates issue-creation guidance to help prevent duplicate issues when a create response is lost or times out during search-indexing lag.

Changes:

  • Advises checking list_issues sorted by CREATED_AT DESC before retrying issue creation.
  • Documents indexing lag in semantic and lexical search_issues descriptions.
  • Updates the issue-authoring skill, tests, instruction digest, and tool snapshot.
File Description
pkg/​skills/​catalog/​skills/​issue-authoring/​SKILL.md Adds duplicate-prevention guidance after failed or timed-out issue creation.
pkg/​http/​server_test.go Updates expected semantic and lexical search description text.
pkg/​github/​toolset_instructions.go Adds guidance to check recently created issues before retrying creation.
pkg/​github/​testdata/​toolset-instructions.json Refreshes the issues instruction digest.
pkg/​github/​issues.go Documents indexing lag for semantic and lexical issue searches.
pkg/​github/​__toolsnaps__/​search_issues.snap Updates the search tool description snapshot.

Review effort: Lite (adaptive)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

search_issues can't see an issue created seconds ago, so the "search before creating" guidance leads to duplicates on retry

2 participants