You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Desktop client should provide cache management and cleanup settings #29037
I have verified this feature I'm about to request 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)
If your request covers new ground not addressed in those issues, feel free to clarify the distinction. Otherwise, consider adding a comment or upvote there instead.
Thanks for the links. I've reviewed all three related issues and believe this feature request is distinct from each of them:
vs #25816 (Factory reset, session management, and cache cleanup tools):
That issue proposes a CLI-level "clear cache" command and factory reset functionality. My request focuses specifically on the Desktop client UI — a visual cache management page in Settings/Preferences that:
Shows per-category disk usage (tool-output, log, repos, storage, etc.)
Provides one-click cleanup per category, not just a blanket "clear all"
Supports auto-cleanup policies (on exit, by size threshold, by age)
Enables configurable storage limits with automatic eviction of oldest data
The tool-output/ directory alone can grow to 20GB+ from WebFetch tool calls with no visibility or cleanup mechanism — this is a concrete UX problem in the Desktop client that a CLI command alone doesn't solve.
vs #28600 (Centralize persistent state and document all config/cache paths):
That issue proposes an opencode paths diagnostic command to list where files live. It's about discoverability/documentation, not about cleanup or storage management. The two are complementary but not overlapping.
vs #24255 (Auto-cleanup of large cached legacy opencode binaries):
That issue is about cleaning up old opencode versions in Bun's install cache (~/.bun/install/cache/), which is a package manager cache concern, not about opencode's own runtime cache at ~/.local/share/opencode/.
For a stopgap while native settings are designed: I'm the author of Clean My Agent, which handles cache inspection and cleanup for OpenCode desktop sessions from outside the app.
Activity
github-actions commentedon May 23, 2026
This issue might be a duplicate of existing issues. Please check:
If your request covers new ground not addressed in those issues, feel free to clarify the distinction. Otherwise, consider adding a comment or upvote there instead.
JinkaiNiu commentedon May 23, 2026
Thanks for the links. I've reviewed all three related issues and believe this feature request is distinct from each of them:
vs #25816 (Factory reset, session management, and cache cleanup tools):
That issue proposes a CLI-level "clear cache" command and factory reset functionality. My request focuses specifically on the Desktop client UI — a visual cache management page in Settings/Preferences that:
The
tool-output/directory alone can grow to 20GB+ from WebFetch tool calls with no visibility or cleanup mechanism — this is a concrete UX problem in the Desktop client that a CLI command alone doesn't solve.vs #28600 (Centralize persistent state and document all config/cache paths):
That issue proposes an
opencode pathsdiagnostic command to list where files live. It's about discoverability/documentation, not about cleanup or storage management. The two are complementary but not overlapping.vs #24255 (Auto-cleanup of large cached legacy opencode binaries):
That issue is about cleaning up old opencode versions in Bun's install cache (
~/.bun/install/cache/), which is a package manager cache concern, not about opencode's own runtime cache at~/.local/share/opencode/.blain3white commentedon Jun 9, 2026
For a stopgap while native settings are designed: I'm the author of Clean My Agent, which handles cache inspection and cleanup for OpenCode desktop sessions from outside the app.
github-actions commentedon Aug 9, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.