Catalog/OpenCode

Config & secrets · Transcripts

OpenCode

OpenCode stores sessions, messages, and parts in ~/.local/share/opencode/opencode.db.

SST Linux · macOS · Windows SQLite · JSON

Exposure

High
Stores found
2
Holds
API keys · personal data · source code
Confidence
likely

Where it writes

2 stores in the current signature database. Paths shown for a typical macOS install.

Transcripts high

SQLite may hold personal data · source code

  • all OSes ~/.local/share/opencode/opencode.db

OpenCode stores sessions, messages, and parts in ~/.local/share/opencode/opencode.db.

  • Set OPENCODE_DATA_DIR to relocate the store, or prune old sessions.

Source: deepwiki.com

Config & secrets high

JSON may hold API keys

  • all OSes ~/.local/share/opencode/auth.json

OpenCode stores provider API keys and OAuth tokens in ~/.local/share/opencode/auth.json.

  • Restrict permissions on the opencode data directory and keep it off cloud sync.

Source: opencode.ai

What to do about it

PromptDust flags these stores and leaves them in place; cleanup is your call. If a store holds a live secret, rotate the secret first, since deleting the file won’t un-leak a key that already sat in plain text.

For ongoing work, keep sensitive material out of sessions where you can, and prune old transcripts and caches now and then.

This describes where OpenCode stores data. Metadata only, never your content. Confidence: likely. Spot a mistake? Tell us.

See if this one’s on your machine.

One pass finds every store, for this tool and the other 51.