Skip to content

Opencode

Pulse installs an Opencode plugin that subscribes to Opencode events and forwards normalized event payloads to pulse emit.

All spans are tagged with source: "opencode".

Requires a running Pulse trace service and a local Pulse CLI setup.

  1. Configure Pulse CLI.
Terminal window
pulse init
  1. Connect Opencode hooks.
Terminal window
pulse connect

If your CLI prompts for an integration target, choose Opencode.

  1. Verify installation.
Terminal window
pulse status

Detection path: ~/.config/opencode/
Installed plugin path: ~/.config/opencode/plugin/pulse-plugin.ts

pulse connect only modifies the Pulse plugin file and leaves other Opencode configuration untouched.

Safe to re-run:

  • pulse connect is idempotent
  • pulse disconnect removes only Pulse artifacts
Opencode eventPulse eventNotes
session.createdsession_startSession starts
session.idlesession_endreason="idle"
session.errorsession_endreason="error" plus error details
message.updated (user)user_prompt_submitCaptures prompt text
message.updated (assistant)assistant_messageCaptures output, tokens, cost when available
tool.execute.beforepre_tool_useCaptures tool name, input, ID
tool.execute.afterpost_tool_useCaptures tool response
FieldDescription
span_idUUID v4 span identifier
session_idOpencode session identifier
timestampEvent timestamp (ISO 8601)
sourceopencode
kindHigh-level event category
event_typeSpecific event type
statussuccess or error
tool_nameTool name for tool events
tool_inputSerialized tool input
tool_responseTool output payload
errorError payload for failed events
metadataProject ID, CLI version, and extra event metadata

When running pulse connect or pulse status, Pulse can detect if the installed plugin is stale compared to the version bundled in the CLI binary.

If stale, run:

Terminal window
pulse connect

Enable debug logs when validating a new integration setup:

Terminal window
export PULSE_DEBUG=1

Then run Opencode once and inspect:

Terminal window
pulse status

For CLI-wide troubleshooting, see CLI Reference.