Before submitting#
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
dev to main (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).