Repository navigation
feat(server): stop idle sessions that spend without delivery (release line) - #125
Merged
Merged
Conversation
Idle threads could keep spending after the useful work stopped. Price context-window updates and stop or flag a thread once idle spend or the session ceiling is crossed. Enforce is the default. The next automated turn is also refused on an untitled thread or one with no execution scope. A linked pull request, a file-changing checkpoint, or a spend-guard.released activity starts the window over. Settled threads wake when the guard flags or stops them. Model: grok-4.7 Task: feature Agent: grok Harness: t3/codex (cherry picked from commit e86d9ed) Ported-to: release/native-0.1.10 (CLO-941) Model: claude-opus-5-5 Task: CLO-941 port CLO-922 Agent: magpie-port Lane: magpie Harness: t3/claude-code Model-family: Claude Model-generation: 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…equest A standing manager can keep spending through status nudges and child callbacks after a real pull request, which resets the idle window. Cover that ceiling stop in the evaluator and in the provider reactor. Model: grok-4.7 Task: feature Agent: grok Lane: magpie Harness: t3/codex Model-family: Grok Model-generation: 4.7 (cherry picked from commit ae80a45) Ported-to: release/native-0.1.10 (CLO-941) Model: claude-opus-5-5 Task: CLO-941 port CLO-922 Agent: magpie-port Harness: t3/claude-code Model-family: Claude Model-generation: 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The thread detail query capped activities at 500 rows, so a long manager thread could stay under the ceiling. Read every spend-guard activity, interrupt a live turn only for the ceiling, and keep untitled or ownerless refusals on cli and missing surfaces. Model: grok-4.7 Task: fix Agent: grok Lane: magpie Harness: t3/codex Model-family: Grok Model-generation: 4.7 (cherry picked from commit 0d990dc) Ported-to: release/native-0.1.10 (CLO-941) Model: claude-opus-5-5 Task: CLO-941 port CLO-922 Agent: magpie-port Harness: t3/claude-code Model-family: Claude Model-generation: 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spend stop refused web and mobile turns too, so a thread past its limit could not run the turn that links a pull request or changes files. The stop now refuses only automated turns, as the setting describes, matching the untitled-launch refusal. Review finding from the CLO-941 port review of the session spend guard (CLO-922). Model: claude-opus-5-5 Task: CLO-941 port the session spend guard (CLO-922) to the release line Agent: magpie Lane: magpie Harness: t3/claude-code Model-family: Claude Model-generation: 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…/clo-922-release # Conflicts: # apps/server/src/server.ts
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.
The session spend guard (Linear CLO-922) was merged into the stale
mainin #118, which the fleet does not build, so it was not running anywhere. This PR ports its three commits ontorelease/native-0.1.10(Linear CLO-941).mainuses the oldorchestration/reactors and the release line usesorchestration-v2, so most of the change had to be rewritten:SessionSpendGuardprices each provider turn's token usage. Pull request links and checkpoints that changed files restart the idle window.ProviderTurnStartServicerefuses a turn past the ceiling, the same way it refuses a mode above its limit.SessionSpendGuardReactorwrites the flagged and stopped notices, wakes a settled thread withthread.unsettled, and interrupts a live run only when it hits the ceiling.Closura:comment are taken from feat(server): stop idle sessions that spend without delivery #118 unchanged.Not carried over 1:1: the no-owner refusal (the release line has no thread execution scope) and the
spend-guard.releasedactivity. The commit bodies keep #118's original wording, so where they mention context-window pricing or execution scope, the list above is what this branch does.Tests:
SessionSpendGuard.test.tsandProviderTurnStartService.test.tspass (97),settings.test.tspasses (35), and six other turn-start suites pass (351). Typecheck passes fort3and@t3tools/contracts.check:changedshows the same knip andAgentContextBudgetfailures that are already on the base.Review round (claude-fable-5-2):
Closura:setting comment says. Standing bot threads stay subject to it, since that is the Crown shape CLO-922 targets. The new test fails before the fix and passes after; turn-start and spend-guard tests pass (98).Deploy: fleet
Model: claude-opus-5-5
Task: CLO-941 port the session spend guard (CLO-922) to the release line
🤖 Generated with Claude Code