Skip to content

feat(desktop): toggle to disable cold-resume tool-result pruning#4255

Merged
esengine merged 1 commit into
main-v2from
feat/cold-resume-prune-toggle
Jun 13, 2026
Merged

feat(desktop): toggle to disable cold-resume tool-result pruning#4255
esengine merged 1 commit into
main-v2from
feat/cold-resume-prune-toggle

Conversation

@esengine

Copy link
Copy Markdown
Owner

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

  • Core config: [agent] cold_resume_prune (*bool, default on) + ColdResumePruneEnabled() accessor + SetColdResumePrune editor + toml render line. The CLI honors it too, not just the desktop.
  • Controller: gated maybeColdResumePrune on a new Options.DisableColdResumePrune. It's the inverse (zero value keeps the prune on), so existing callers and resume_prune_test are unaffected without changes.
  • Desktop: AgentView.coldResumePrune + App.SetColdResumePrune (via applyConfigChange so the live controller picks it up).
  • Frontend: AppBindings + mock + AgentView type + 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/ — pass
  • core + desktop Go build, wails build (bindings regenerate with SetColdResumePrune)
  • npm --prefix desktop/frontend run typecheck + check:css — pass

(Two desktop Go tests fail on this Windows box on the clean base too — TestAddSkillPathRestoresConventionRootWithoutCustomPath is a ~/.agents/skills path-comparison baseline issue, plus a TempDir cleanup flake — both unrelated to this change.)

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.
@esengine esengine requested a review from SivanCola as a code owner June 13, 2026 05:36
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) and removed v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 13, 2026
@esengine esengine merged commit 07d521a into main-v2 Jun 13, 2026
14 checks passed
@esengine esengine deleted the feat/cold-resume-prune-toggle branch June 13, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) desktop Wails desktop app (desktop/**)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant