Describe the bug
When running the gh pr list command with the --search "linked:issue" filter, the results sometimes include pull requests that do not have any linked issues.
This appears inconsistent and non-deterministic, as repeated executions of the same command return different sets of results, including PRs where closingIssuesReferences is an empty list.
Command Used
gh pr list --search "linked:issue" --repo <repo_org>/<repo_name> --state merged --limit 10 --json number,closingIssuesReferences,title,body,url
Affected version
gh version 2.88.1 (2026-03-12)
https://github.com/cli/cli/releases/tag/v2.88.1
Steps to reproduce the behavior
For example, looking at this Repository: 4gray/iptvnator, the output includes Pull Request: #616.
URL of this Pull Request: 4gray/iptvnator#616
Command Used
gh pr list --search "linked:issue" --repo 4gray/iptvnator --state merged --limit 10 --json number,closingIssuesReferences,title,body,url
This PR is returned by the command but has no linked issues.
Output
[
{
"body": "<Truncated>",
"closingIssuesReferences": [],
"number": 616,
"title": "Fix hardcoded playlist name in URL import to use filename extraction",
"url": "https://github.com/4gray/iptvnator/pull/616"
},
...
]
Another Repository: 514-labs/moosestack, the output includes multiple Pull Requests with empty closingIssuesReferences.
Expected Behavior
Only pull requests that have at least one linked issue (i.e., non-empty closingIssuesReferences) should be returned when using: --search "linked:issue"
Actual Behaviour
Some PRs returned by the command have: "closingIssuesReferences": []
Additional Notes
- The issue does not occur consistently; rerunning the command yields different results.
- Inspecting the PR body, commits, and comments does not reveal any linked issues.
- There is often partial overlap between runs, with some valid PRs (with linked issues) mixed with invalid ones.
- This makes it difficult to rely on
--search "linked:issue" for automation.
- This raises concerns about both false positives and potential false negatives.
Describe the bug
When running the
gh pr listcommand with the--search "linked:issue"filter, the results sometimes include pull requests that do not have any linked issues.This appears inconsistent and non-deterministic, as repeated executions of the same command return different sets of results, including PRs where
closingIssuesReferencesis an empty list.Command Used
Affected version
Steps to reproduce the behavior
For example, looking at this Repository:
4gray/iptvnator, the output includes Pull Request:#616.URL of this Pull Request: 4gray/iptvnator#616
Command Used
This PR is returned by the command but has no linked issues.
Output
Another Repository:
514-labs/moosestack, the output includes multiple Pull Requests with emptyclosingIssuesReferences.Expected Behavior
Only pull requests that have at least one linked issue (i.e., non-empty
closingIssuesReferences) should be returned when using:--search "linked:issue"Actual Behaviour
Some PRs returned by the command have:
"closingIssuesReferences": []Additional Notes
--search "linked:issue"for automation.