Skip to content

gh pr list --search "linked:issue" returns PRs without any linked issues (False Positives) #13070

@Jai2501

Description

@Jai2501

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions