You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Thread menu: add "When done" to Auto-settle behavior so one thread settles as soon as it finishes
#36459
The thread menu's Auto-settle behavior has Follow settings and Never. It can keep one thread out of auto-settle, but it can't do the reverse: settle one thread as soon as it's done. The Compact before cache expires submenu right below it has three options, so this one looks like it is missing one.
Problem
#28707 reported that with auto-settle turned off in Settings → Threads, choosing "Enabled" on a thread did nothing. #29025 fixed the label (Enabled → Follow settings) and set the per-thread opt-in aside as a separate feature. The result is a one-way control.
My use case: I keep auto-settle off because most threads are long-running work I come back to. Some threads are fire-and-forget, though: a one-off question, a quick fix, a delegated chore. For those I want the thread to leave the sidebar the moment the agent finishes, without settling it by hand.
Proposal
Add When done between the two existing options (Follow settings / When done / Never). A When done thread settles as soon as its latest run completes, whatever the environment's rules say.
A failed or stopped run does not settle it, so errors stay visible.
Pending questions and approvals, background work the agent is waiting on, snoozes and pins still hold it, as they do for auto-settle today.
Un-settling it keeps it active until its next turn (the existing settledOverride: "active" behavior). After that turn completes, it settles again.
Never and Follow settings clear it.
Implementation sketch (working in a fork)
Contracts: an optional nullable per-thread timestamp next to autoSettleDisabledAt, and an optional flag on the existing thread.auto-settle.set command. No new command, and no migration, since the field lives in the thread payload JSON.
ThreadSettlementService.resolveAutoSettlementAt: if the flag is set and the latest run is completed, settle at the last activity time. The existing per-thread sweep on run.updated makes this immediate, and thread.auto-settle-set also starts a per-thread sweep. When no rule is configured, the sweep queries only these threads (a SQL filter) instead of returning early.
Clients (web sidebar, web thread menu, mobile): show the option only when the shell carries the field, the same way compactBeforeCacheExpires is detected, so older servers keep the two-option menu.
About 100 lines across contracts, server, client-runtime, web and mobile, with focused tests in ThreadSettlementService.test.ts, ProjectionSettlement.test.ts and Orchestrator.control-reads.test.ts.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The thread menu's Auto-settle behavior has Follow settings and Never. It can keep one thread out of auto-settle, but it can't do the reverse: settle one thread as soon as it's done. The Compact before cache expires submenu right below it has three options, so this one looks like it is missing one.
Problem
#28707 reported that with auto-settle turned off in Settings → Threads, choosing "Enabled" on a thread did nothing. #29025 fixed the label (Enabled → Follow settings) and set the per-thread opt-in aside as a separate feature. The result is a one-way control.
My use case: I keep auto-settle off because most threads are long-running work I come back to. Some threads are fire-and-forget, though: a one-off question, a quick fix, a delegated chore. For those I want the thread to leave the sidebar the moment the agent finishes, without settling it by hand.
Proposal
Add When done between the two existing options (Follow settings / When done / Never). A When done thread settles as soon as its latest run completes, whatever the environment's rules say.
settledOverride: "active"behavior). After that turn completes, it settles again.Implementation sketch (working in a fork)
autoSettleDisabledAt, and an optional flag on the existingthread.auto-settle.setcommand. No new command, and no migration, since the field lives in the thread payload JSON.ThreadSettlementService.resolveAutoSettlementAt: if the flag is set and the latest run iscompleted, settle at the last activity time. The existing per-thread sweep onrun.updatedmakes this immediate, andthread.auto-settle-setalso starts a per-thread sweep. When no rule is configured, the sweep queries only these threads (a SQL filter) instead of returning early.compactBeforeCacheExpiresis detected, so older servers keep the two-option menu.About 100 lines across contracts, server, client-runtime, web and mobile, with focused tests in
ThreadSettlementService.test.ts,ProjectionSettlement.test.tsandOrchestrator.control-reads.test.ts.Related: #28707, #29025, #26097, #19263.
All reactions