Before submitting#
Area#
apps/server
Steps to reproduce#
- Keep Settings → Threads → Auto-settle merged threads on (the default).
- Start Thread A in a new worktree on a branch.
- Start Thread B in the same worktree (composer workspace → Current worktree / Previous worktree).
- Create a PR from Thread A (Commit, push & PR, or let the agent run
gh pr create). T3 links the PR to Thread A; Thread B shows the same PR in the sidebar through its branch.
- Merge the PR.
Expected behavior#
Both threads settle, as they did before #40564.
Actual behavior#
Only Thread A settles. Thread B stays active even though its sidebar row shows the PR as merged. With Keep threads with a PR on, Thread B never auto-settles, not even after the inactivity days. Closed PRs behave the same way.
#40564 (fixing #40554) made a thread with no PR link of its own skip a merged or closed PR that another thread links. #40554 was about Local threads in the project checkout, where the branch is whatever the checkout is on, and it suggests Worktree mode as the workaround. But the check in ThreadSettlementService does not tell the project checkout from a worktree, where every thread works on the worktree's branch. Since T3 links a PR to the thread that creates it, nearly every PR made in T3 now keeps the other threads in its worktree active.
Impact#
Minor bug or occasional failure
Version or commit#
0.1.12 (nightly); reproduced on main at d5d5c17ecb
Environment#
Linux, T3 Code desktop
Workaround#
Link the PR to every thread in the worktree (command palette → Link pull request to thread), or settle them by hand.