Skip to content

fix(desktop): turn RustCode's auto-compaction off by default - #3455

Open
LHagfoss wants to merge 1 commit into
mainfrom
fix/desktop-auto-compact-off-default
Open

LHagfoss wants to merge 1 commit into
mainfrom
fix/desktop-auto-compact-off-default

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

RustCode compacted a Claude Code thread on its own at 154k of a 1M window, because DEFAULT_AUTO_COMPACT.mode was "size", and the context popover then said the harness "compacts on its own". Now:

  • The default mode is off. A stored choice (size or cache, object or old string form) is still read back unchanged.
  • When RustCode starts a compaction, the divider reads "Compacting context (auto, over 150k)…" (or "…before the cache expires…"), and it and the "Compacted automatically" row link to the Auto-compact setting.
  • The context popover for a harness that reports totals only says "RustCode compacts it above N" when the setting applies, and the harness's own behavior only otherwise.
  • Settings says the setting is off by default; turning it on is one change in the existing Auto-compact row.

Changelog

RustCode no longer compacts threads on its own unless you turn on Auto-compact in Settings; when it does, the divider says so and links to the setting.

Testing

bun run check in apps/desktop (typecheck, biome, tests, build). New tests in autoCompact.test.ts (default off, stored choice kept, divider text) and autoCompact.store.test.ts (a fresh install does not compact; the running divider carries the reason and the setting link). Rule tests now set the size rule on explicitly.

Closes #3439

@github-actions github-actions Bot added the fix A bug fix label Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(desktop): turn RustCode's auto-compaction off by default

1 participant