What OpenCode leaves on your Mac.
Session database, undo snapshots, old session files, logs and worktrees. Devbroom only reads the database and checks its format on every scan; if the format doesn't hold, none of OpenCode's data counts as ready to clean.
Every folder has its own rule.
Devbroom handles every place the way OpenCode itself behaves. What the agent cleans itself it leaves to the agent; what has its own command it leaves to that command.
Undo snapshots
Shadow git repositories; orphaned when projects or worktrees are deleted.
~/.local/share/opencode/snapshotSession files from before 1.2
Copied into SQLite on migration and never deleted.
~/.local/share/opencode/storageLogs and cache
A single log file that's never rotated, and a cache documented as safe to delete.
~/.local/share/opencode/log~/.cache/opencodeSession database
Read only. The file never shrinks by itself; clean it with opencode session delete <id>.
~/.local/share/opencode/opencode.dbOpenCode worktrees
Should be removed from the OpenCode app; they never expire by themselves.
~/.local/share/opencode/worktreeTool output
While running, OpenCode deletes the ones older than 7 days itself.
~/.local/share/opencode/tool-outputYour account and settings stay untouched.
These files and folders are protected. No verdict ever opens them to cleaning; they stay where they are whatever their size.
opencode.db · -wal · -shmauth.jsonmcp-auth.jsonRecognizes OpenCode's worktrees by their traces.
It tells a worktree belongs to OpenCode from these traces; the stronger the trace, the more certain the ownership it shows.
- LikelyInside OpenCode's worktree folder
- PossibleA branch name starting with
opencode/
- Blocked if it holds unsaved work. git won't remove such a worktree without
--force; Devbroom never uses--force. - Blocked if a session runs in it or in its parent folder.
- Review if it has ignored files:
git worktree removedeletes them without asking.
Sees them, leaves them alone while they run.
Devbroom reads from the database which OpenCode sessions are in which folder. It never touches a running session's processes; its folder stays Blocked while the session lasts.
Checks OpenCode's files first.
Before trusting an agent's data, Devbroom checks that its files are in the expected format. If they aren't, that data is only read; none of it counts as ready to clean.
A version outside this range still works if the format holds, and shows as “not tested yet”.
opencode.db must open read only and its session table must have these two columns.
If its folders live elsewhere, it follows XDG_DATA_HOME, XDG_CACHE_HOME, OPENCODE_DB.