Skip to content

[Bug]: Docs say pinning doesn't stop automatic settlement, but pinned threads never auto-settle #40500

Closed as not planned

Description

@PixPMusic

Area

Docs and apps/server: automatic settlement of pinned threads.

Steps to reproduce

  1. Keep automatic settlement on in Settings → Threads (the default settles threads after seven days of inactivity and when their pull request merges).
  2. Pin a thread that is otherwise eligible: idle past the inactivity window, or with a merged pull request.
  3. Let the settlement sweep run, then compare the result with the thread sidebar guide.

Expected behavior

The user guide and the server agree on whether a pin keeps a thread out of automatic settlement.

Actual behavior

The guide says:

Pinning does not prevent automatic settlement. Settling a thread removes its pin.

The server never auto-settles a pinned thread. It filters pins out in two places:

Manual settle still works on a pinned thread and removes its pin. The per-thread Auto-settle behavior → Never option is a separate control for keeping one thread out of automatic settlement.

History

No commit after #2829 changes how settlement treats pins.

Decision needed

Which behavior is intended?

  1. Pins block automatic settlement (current server behavior, as [Feature]: Prevent pinned threads from auto-settling #11711 asked). Update the docs sentence to say pinned threads don't settle automatically, and that settling one yourself removes its pin.
  2. Pins don't block automatic settlement (current docs, pre-V2 behavior). Remove the pin filter from isAutoSettlementCandidate and from the candidate query. Automatic settlement already goes through thread.settle, which clears pinnedAt, so the second docs sentence holds with no other change. Auto-settle behavior → Never stays the way to keep a thread out.

I can open the PR for either one once there's a decision. The open issue status automation PR, #39940, copies the same pin exclusion for issue-driven settlement and will follow whichever way this goes.

Environment and impact

  • main at 9fdcd08835ebd15e134b6abb7e5a65031b1f1266. Found by reading the source and history; not reproduced in a running app.
  • Minor. Someone who follows the guide expects an idle pinned thread to settle, and it stays pinned instead. Agents that answer from the user guide give the same wrong answer.

Search and scope

Searched open issues and PRs for pinned threads and automatic settlement. Only #11711, now closed, covers this behavior.

Activity

  1. added
    vouch:trusted
    on Nov 21, 2026
  2. juliusmarminge commented on Nov 21, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on the current build and could not.

    On origin/main fcf5097: docs/user/thread-sidebar.md:82 still reads 'Pinning does not prevent automatic settlement. Settling a thread removes its pin.' The server leaves pinned threads out of auto-settlement in ThreadSettlementService.ts:166 (isAutoSettlementCandidate returns false when pinnedAt is set) and ProjectionStore.ts:8844 (the candidate query requires $.pinnedAt IS NULL). After vp i, apps/server vp test run src/orchestration-v2/ThreadSettlementService.test.ts passed 49/49; one of its cases adds a pinned child thread (test line 1037) among the settlement candidates. I did not trace what that case asserts about the pinned thread. I did not start the app or run a sweep: the issue is the docs disagreeing with the server, and the server side was read from the code and backed by its existing test.

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions