[Bug]: Opening a release PR (dev → main) retroactively adopts every thread on the shared branch — all settled threads wake up stamped with the new PR number
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Use a long-lived integration branch (
dev) in a local checkout; accumulate several threads on it over time and settle them as they finish. - Open a release PR from
devtomain(e.g. #562 in my repo). - Look at the sidebar.
Expected behavior
The release PR is unrelated to those historical threads. Settled threads stay settled and keep whatever PR association they had (or none).
Actual behavior
Every thread whose checkout branch is dev — including threads settled hours ago — instantly wakes up and displays the new PR badge. One release PR resurrects the entire history of the branch in the Active list.
Additional context
Root cause looks the same as #4970 and #4752: the thread↔PR association appears to be keyed on the checkout's current branch name alone. Any PR whose head is a shared long-lived branch gets attached to every thread bound to it, and PR-state transitions then propagate settle/unsettle to all of them. A per-thread binding (PR created from within the thread, or explicitly attached) would fix all three facets.
This may also explain #5476 (thread on dev auto-settling after every turn — likely tracking a merged PR from the same shared branch rather than the one the agent created).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/web by reproducing the dev-to-main release PR scenario and tracing how thread↔PR associations use the shared branch. Compare the behavior with issues #4970, #4752, and #5476. Done means historical settled threads remain settled and are not assigned the new PR unless explicitly associated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100