Repository navigation
feat(threads): record what settled a thread and show it in MCP - #47
Merged
Merged
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Threads now keep a settlementSource next to settledAt: user, agent, or the auto-settle rule that fired (linked or branch pull request merged/closed, inactivity). t3_thread_read and t3_thread_list return it. Unsettling clears it; existing settled threads stay unknown.
maschwenk
force-pushed
the
feat/settlement-source
branch
from
November 9, 2026 10:14
0e689cb to
2dcf823
Compare
maschwenk
marked this pull request as ready for review
November 9, 2026 10:27
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
on 2026-11-09 the thread
mcp:ac48f2ab-5aac-40fc-80f3-17504248d680got settled while its last message was still asking me a question, and the thread itself didn't say what settled it.thread.auto-settlereuses the samethread.settlemutation a manual settle uses, so the payload only hadsettledAtandsettledOverride: "settled". i had to back it out fromsettledAtmatching the run'scompletedAtto the ms (it was the closed PR rule)fwiw the "who" was already in
orchestration_command_receipts(command type plus the command id prefix:server:auto-settle:,server:settle-after-run:,mcp:, bare uuid from the app). what wasn't anywhere is which auto-settle rule fired. so this is mostly about putting it on the thread where it's cheap to read, exposing it in MCP, and recording the rulewhat changed
settlementSourcenext tosettledAtuser: the app's settle (web, mobile, keybinding)agent:t3_thread_organizesettle. the settle-when-turn-ends path (server:settle-after-run) also counts asagent, it only runs when an agent settles its own thread mid turnauto_pull_request_merged/auto_pull_request_closed: a PR linked to the threadauto_branch_pull_request_merged/auto_branch_pull_request_closed: a PR the sweep found from the thread's branch with nothing linked (the subagent case)auto_inactivity:sidebarAutoSettleAfterDaysthread.auto-settle. client settles get stampeduserat the ws boundary, so a client can't claim it was an agent or a rulet3_thread_readandt3_thread_listreturn it next tosettled/settledAtpayload_jsonso no migrationtradeoffs
settledAtmeans replaying no-op re-settles and every unsettle path (unsettle, message dispatch, pin, guest message). and auto-settle receipts don't have the rule, so the most useful part would still be unknown. existing settled threads stay nullsettledAtopens, so a downgrade can't break a thread payloadnot touching the closed PR rule itself here, that's a separate call
possible ui follow-up: map it in client-runtime
models.tsand show it on hover for settled rows inSidebarThreadRow.tsx, or in the thread action menu next to unsettlewritten with claude opus 5.5 in claude code