feat(desktop): toggle to disable cold-resume tool-result pruning#4255
Merged
Conversation
Reopening a session idle past the provider cache window (~24h) auto-elides stale tool results to cheapen the cold restart. Some users would rather keep full history at the higher cold-start cost, so expose a toggle. Adds [agent] cold_resume_prune (default on; the CLI honors it too) gated in the controller's maybeColdResumePrune via Options.DisableColdResumePrune (zero value preserves the prune, so existing callers and tests are unaffected). Desktop surfaces it in the Agent runtime settings section, 3 locales included.
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.
Summary
Reopening a session that has been idle past the provider cache window (~24h) auto-elides stale tool results to cheapen the cold restart (
maybeColdResumePrune). Some users would rather keep the full transcript and pay the higher cold-start cost — this adds a toggle for that.What changed
[agent] cold_resume_prune(*bool, default on) +ColdResumePruneEnabled()accessor +SetColdResumePruneeditor + toml render line. The CLI honors it too, not just the desktop.maybeColdResumePruneon a newOptions.DisableColdResumePrune. It's the inverse (zero value keeps the prune on), so existing callers andresume_prune_testare unaffected without changes.AgentView.coldResumePrune+App.SetColdResumePrune(viaapplyConfigChangeso the live controller picks it up).AppBindings+ mock +AgentViewtype + a toggle in the Agent runtime settings section; en / zh / zh-TW strings.Default & behavior
Default on = current behavior (cheaper cold restart). Off = keep full history on cold reopen.
Validation
go test ./internal/config/ ./internal/control/— passwails build(bindings regenerate withSetColdResumePrune)npm --prefix desktop/frontend run typecheck+check:css— pass(Two desktop Go tests fail on this Windows box on the clean base too —
TestAddSkillPathRestoresConventionRootWithoutCustomPathis a~/.agents/skillspath-comparison baseline issue, plus a TempDir cleanup flake — both unrelated to this change.)