ocgc
OpenCode Garbage Collector. Analyze and reclaim storage used by OpenCode sessions, diffs, and snapshots.
The Problem
OpenCode stores sessions in a SQLite file that grows without limit and has no built-in cleanup mechanism, wasting disk space over time.
Highlights
- Status dashboard with database size and session breakdown
- Smart purge with filters for age, size, agent type, and reasoning tokens
- Dry-run mode and safety prompts before destructive operations
- Orphan diff and git snapshot cleanup