-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
bugSomething isn't workingSomething isn't workingcompact-uxIssues related to /compact command user experienceIssues related to /compact command user experience
Description
Problem
Manual /compact currently calls force_compact(), but force mode still requires a valid retention boundary. If calculate_retention_boundary() returns 0, the command exits with:
Compaction skipped (no eligible boundary).
For users this is a hard-stop on an explicit command.
Why this is a UX bug
Auto-compaction can be conservative and boundary-safe.
Manual compaction should be user-authoritative (or provide an explicit override mode), not blocked by the same boundary gate.
Current behavior (proof points)
src/tunacode/ui/commands/compact.py- calls
controller.force_compact(...) - shows
Compaction skipped (no eligible boundary).when outcome is non-compacted
- calls
src/tunacode/core/compaction/controller.pyforce_compact()delegates into_compact(...)_compact(...)computes boundary viacalculate_retention_boundary(...)- returns
no_valid_boundarywhen boundary<= 0
src/tunacode/core/compaction/summarizer.py- strict boundary validity rules (role/stop_reason/tool_result constraints)
Expected behavior
When the user explicitly runs /compact, command should not dead-end on no_valid_boundary.
Acceptable solutions:
- Add manual override mode (
/compact --unsafeor equivalent), or - Make
/compactpath use a fallback policy that still compacts with explicit warning semantics.
Acceptance criteria
- Repro session that currently returns
no_valid_boundaryno longer ends with dead skip on manual command. - Auto-compaction safety policy remains unchanged for background/threshold triggers.
- Tests cover manual command outcome contract and boundary/override behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompact-uxIssues related to /compact command user experienceIssues related to /compact command user experience