Skip to content

agent-msg 0.2.0 — OpenCode integration

Pre-release
Pre-release

Choose a tag to compare

@nsssayom nsssayom released this 06 Oct 19:33
· 1 commit to main since this release

agent-msg 0.2.0 — OpenCode integration (alpha)

OpenCode joins Claude Code and Codex as a native messaging peer. Use the same agents, send, reply, journal and reply-wait commands across all three harnesses.

What changed

  • A small OpenCode plugin bridges a private Unix socket to the native session SDK. It works with the TUI's in-process API; no TCP listener, server password, daemon or npm dependency is required.
  • Live-session discovery excludes historical sessions and verifies registry ownership, permissions, process start time and socket ownership. Duplicate session IDs hosted by multiple processes fail closed.
  • Native asynchronous prompts preserve the session's agent, model, variant and tool permissions. Busy sessions consume messages through their existing loop without an abort.
  • Sender attribution combines per-command session metadata with process ancestry. Correlated replies and native notifications work through the existing journal protocol.
  • Replies now work across working directories, using the original journaled sender and live destination validation. Initial cross-directory sends still use --cwd TARGET_DIR.
  • Added agent-msg opencode install --symlink, OpenCode target/skill-install options, and an OpenCode identity style in the journal UI.
  • Added offline socket/SDK integration tests and an opt-in native OpenCode API smoke test that disables inference.

Install

Install the 0.2.0 wheel or current marketplace plugin, then run:

agent-msg opencode install --symlink
agent-msg agents --harness opencode --json

For a plugin-only installation, use its bundled Python launcher instead of agent-msg. --dest DIR selects an OpenCode configuration directory. Start a new OpenCode process and create or use a session to register it. Existing customized installation files are preserved.

Existing Claude/Codex installations also need 0.2.0 to address OpenCode. Use a shared local journal and matching XDG state settings. Custom Claude configuration homes must be supplied through the existing CLAUDE_CONFIG_DIR setting when those peers are not discoverable from the default home.

Validation and limits

Validated on macOS with OpenCode 1.18.34, Claude Code 2.1.291 and Codex 0.160.1:

  • Automated suite: 60 passed; four opt-in live tests skipped in the normal run.
  • All six directed cross-harness pairs completed real correlated request/reply round trips. Claude and OpenCode used the existing local Qwen model; Claude subscription models were not used.
  • OpenCode received prompts while busy and sent native reply notifications to Claude and Codex in different working directories. OpenCode-origin requests also exercised correlated journal replies with --wait.
  • A separate real OpenCode SDK smoke test verified session persistence, sender attribution, replies and preserved agent/model settings without inference. Offline tests cover idle/busy delivery, permissions preservation, stale registrations, duplicate IDs, uncertain dispatch and all six cross-workdir routing combinations.
  • Clean wheel installation, generated-bundle parity, skill/manifests, and disposable Claude/Codex marketplace installation checks passed.

Linux live delivery and restricted sandbox configurations remain unvalidated. Receipt acceptance does not prove a peer read a message. Same-user identity metadata is audit evidence, not cryptographic authentication. OpenCode 1.18.34's V2 bash tool lacks the shell.env hook, so the plugin uses tool.execute.before to export two per-command identity variables. This changes neither shell startup files nor the session's permission policy.

Packaging correction: the checksums manifest was corrected during release verification to exclude a build-directory .gitignore. The wheel, source archive, plugin ZIP and Git tag are unchanged.