Repository navigation
Conversation
A new project-scoped setting, Message on settle (`settlePrompt`, empty by default), holds a message, such as a skill, that a thread gets as one more turn when it settles by hand or automatically. The thread settles again when that turn ends; settle cleanup (idle shells, the settle script) runs after that second settle. Empty keeps settling exactly as before. - once per settlement: a re-emitted thread.settled sends nothing more - a turn that runs past 10 minutes is interrupted, then the thread settles - if the turn leaves the thread waiting on the user (question, approval, queued message), the follow-up settle is refused and the thread stays active - archived threads and threads that take no messages skip it - settings row under Thread behavior, searchable; docs in thread-sidebar.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Settling means "this thread is done", but the agent has no chance to wrap up: summarise what it did, note what's left,
or report it somewhere. The only settle hook today is the project settle script (pingdotgg#16290). That's a shell command, it runs
after the thread is parked, and it skips threads in the shared checkout.
Change
A new project-scoped setting, Message on settle (
settlePrompt, empty by default), under Thread behavior.When a thread settles (by hand, after inactivity, or on merge), the thread gets that message, for example a skill such as
/wrap-up, as one more turn. When the turn ends, the thread settles again, and settle cleanup (idle shells, the settlescript) runs after that.
thread.settledwith the samesettledAtsends nothing more.follow-up settle is refused and the thread stays active for them.
as before).
ThreadSettlementServiceV2, keyed off thethread.settledandrun.*events, so manual,automatic and agent-initiated settles all go through it.
thread-sidebar.md.While the wrap-up turn runs, the thread is briefly active (sending a message re-engages it), then it settles again.
Mobile settings don't show the field yet. The server honours it either way.
Testing
ThreadSettlementService.test.tshas 3 new tests:mainon this machine (file-system and sandboxtests). Contracts: 644 pass. Web: 6,599 pass. Type checks and format are clean.
🤖 Generated with Claude Code