Skip to content

[Bug]: Worktree threads can miss existing pull requests #4106

Description

@tonoizer

Description

Worktree thread VCS status currently couples pull-request discovery to remote Git refreshes and treats lookup failures or an uninitialized remote snapshot like a confirmed absence. This can leave an externally created pull request undiscovered and expose an unsafe Create PR action.

Expected behavior

  • Poll lightweight PR/MR metadata while a worktree thread is subscribed, even when automatic Git fetch is disabled.
  • Correlate cached remote and pull-request state with the branch for which it was calculated.
  • Represent pending and failed provider lookups explicitly.
  • Refresh local and change-request status after primary agent turns.
  • Only offer PR creation after a successful lookup confirms no open change request.

Scope

This should preserve existing provider filtering, default-branch handling, fork matching, and the server-side existing-PR safeguard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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