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

~/.config/opencode/plugins/auspex.ts (%USERPROFILE%\.config\opencode\plugins\auspex.ts on Windows)

MDM-managed, macOS

/Library/Application Support/opencode/plugins/auspex.ts

MDM-managed, Linux

/etc/opencode/plugins/auspex.ts

MDM-managed, Windows

C:\ProgramData\opencode\plugins\auspex.ts

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. Run auspex install and auspex uninstall from a shell where OPENCODE_CONFIG_DIR has 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_wiring names opencode. The plugin file is missing or was changed. Run auspex install --service again (on a managed device, an admin runs sudo auspex install --system). If you set OPENCODE_CONFIG_DIR, auspex status checks only the default folder, so the warning is expected.

  • The plugin is installed, but OpenCode doesn't load it. Remove "-auspex" from plugins in your opencode.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.