Epic: #46
Summary
Use pruning/soft-compaction to reclaim tokens by deleting stale tool outputs instead of resorting to full compaction.
Problem
- Most tokens accrue in tool outputs between recent user turns.
- Current pruning protects the exact region with heavy tool output; premature full compaction follows.
Proposal
- Tune PRUNE_* thresholds; prefer deleting earlier completed tool outputs.
- Consider soft-compaction: mark tool calls with IDs, let model propose safe deletions, then drop those parts and add a soft-compaction note.
- Provide a manual
/prune command and improve auto-triggering heuristics.
Code Refs
- packages/opencode/src/session/compaction.ts:50 (prune function)
- packages/opencode/src/session/compaction.ts:43-45 (PRUNE_* constants)
Tasks
Acceptance Criteria
- Token usage reduced via pruning without harming recency.
- Fewer full compactions during long BUILD sessions.
Epic: #46
Summary
Use pruning/soft-compaction to reclaim tokens by deleting stale tool outputs instead of resorting to full compaction.
Problem
Proposal
/prunecommand and improve auto-triggering heuristics.Code Refs
Tasks
/prunecommand or integrate into/statusAcceptance Criteria