Feature hasn't been suggested before.
Describe the enhancement you want to request
opencode generates various cache files under ~/.local/share/opencode/ during normal operation. The tool-output/ directory, which stores raw output from tools like WebFetch (HTML, JS, cookies, etc.), can grow to 20GB+ over time with no automatic cleanup mechanism.
Currently, compaction settings (compaction.prune) only manage in-memory context/token compression and do not affect on-disk cache files. Users must manually rm -rf these directories.
Suggested solution:
Add a cache management page in the Desktop client's Settings/Preferences with:
-
Cache overview — list cache categories and their current disk usage:
tool-output/ — tool output cache (WebFetch, etc.)
log/ — log files
repos/ — cloned repositories
storage/ — session storage data
- Session/prompt history
-
Cleanup actions:
- One-click "Clear" button per category or "Clear All"
- Auto-cleanup policies (e.g., on exit / by size threshold / by age)
-
Storage limit — configurable maximum cache size; auto-clean oldest data when exceeded
Benefits:
- Prevents unbounded disk usage without user awareness
- Improves desktop client user experience
- Aligns with common IDE conventions (e.g., VSCode's built-in cache management)
Feature hasn't been suggested before.
Describe the enhancement you want to request
opencode generates various cache files under
~/.local/share/opencode/during normal operation. Thetool-output/directory, which stores raw output from tools like WebFetch (HTML, JS, cookies, etc.), can grow to 20GB+ over time with no automatic cleanup mechanism.Currently, compaction settings (
compaction.prune) only manage in-memory context/token compression and do not affect on-disk cache files. Users must manuallyrm -rfthese directories.Suggested solution:
Add a cache management page in the Desktop client's Settings/Preferences with:
Cache overview — list cache categories and their current disk usage:
tool-output/— tool output cache (WebFetch, etc.)log/— log filesrepos/— cloned repositoriesstorage/— session storage dataCleanup actions:
Storage limit — configurable maximum cache size; auto-clean oldest data when exceeded
Benefits: