Note
Grok responding on behalf of Julius.
Confirmed on main. This is a bug, not intended behavior.
In resolveAutoSettlementAt (apps/server/src/orchestration-v2/ThreadSettlementService.ts), the links.some(link => link.snapshot === null || link.snapshot.state === "open") early return runs before the autoSettleKeepPullRequests check and before the inactivity threshold. So any thread with a visible open (or not yet synced) link in pullRequests[] never settles from inactivity, whatever the setting says.
That contradicts the intended behavior:
- #9610 made inactive threads with open PRs settle.
- #14642 added Keep threads with a PR as an opt-in, off by default.
docs/user/thread-sidebar.mdsays an open PR doesn't prevent inactivity settlement unless that setting is on.
Likely fix: keep the early return for merge/close resolution only, and let open links fall through to the autoSettleKeepPullRequests and inactivity checks. A null snapshot should still block settlement, as you noted. A regression test with a persisted open link and keep=false should cover it.