Capture OpenCode with auspex
Last updated: November 16, 2026
auspex captures OpenCode 2.x through a plugin that auspex install places and auspex uninstall removes. There is no OpenCode-specific step: installing or upgrading auspex to a release with OpenCode support places the plugin, and a running OpenCode loads it within seconds.
Platforms. macOS and Linux. Install also places the plugin on Windows, but capture there is not verified yet. OpenCode 1.x is not supported.
Where the plugin goes
Install | Plugin path |
|---|---|
Self-installed |
|
MDM-managed, macOS |
|
MDM-managed, Linux |
|
MDM-managed, Windows |
|
On an MDM-managed device the file is placed once for every user and owned by root.
Do you set
OPENCODE_CONFIG_DIR? OpenCode then reads plugins only from that folder, so install writes to$OPENCODE_CONFIG_DIR/plugins/auspex.ts. Runauspex installandauspex uninstallfrom a shell whereOPENCODE_CONFIG_DIRhas the same value as in the shell that starts OpenCode.
Verify
Run auspex status. Its capture_wiring check should not list opencode as unwired. Then use OpenCode briefly and confirm your session appears in Span.
Uninstall
auspex uninstall removes the plugin with everything else; on an MDM-managed device, the uninstall script in your MDM guide does. To stop capture for OpenCode only on a self-installed device, delete the plugin file. auspex puts it back on the next auspex install.
Troubleshooting
capture_wiringnamesopencode. The plugin file is missing or was changed. Runauspex install --serviceagain (on a managed device, an admin runssudo auspex install --system). If you setOPENCODE_CONFIG_DIR,auspex statuschecks only the default folder, so the warning is expected.The plugin is installed, but OpenCode doesn't load it. Remove
"-auspex"frompluginsin youropencode.json. That entry turns the plugin off, including the one MDM placed.
What auspex captures from OpenCode
Session starts, prompts, tool calls (failed ones too), turn ends, subagents, the model, assistant replies, token usage, skill invocations, and file content around each edit. Code changes come from git, as for every other tool. See the Security Overview for what leaves the device.
OpenCode limits:
OpenCode has no session-end event, so its traces have no end.
Only the start of each tool call is guaranteed. Under heavy load an occasional later event, such as one assistant reply, can be missed.
An event larger than 1 MiB (2 MiB for a tool call) isn't captured.
If you are stuck, share the output of auspex status with the Span team.