oh-my-opencode

Available in nightly builds only.

cmux omo launches OpenCode with the oh-my-openagent plugin in a cmux-aware environment. oh-my-openagent orchestrates multiple AI models (Claude, GPT, Gemini, Grok) as specialized agents working in parallel. When it spawns agent panes, they become native cmux splits.

Usage

cmux omo
cmux omo --continue
cmux omo --model claude-sonnet-4-6

All arguments after omo are forwarded to OpenCode.

What you get

oh-my-openagent's TmuxSessionManager spawns each background agent in its own pane. With cmux omo, those panes become native cmux splits instead of tmux panes:

  • Each subagent (Hephaestus, Atlas, Oracle, etc.) gets its own cmux split, visible in the workspace
  • Auto-layout management: agents are arranged in a grid (main-vertical by default) and resized as agents come and go
  • Idle agents are automatically cleaned up after 3 consecutive idle polls with no new messages
  • If the window is too small for a new agent pane, it queues and retries every 2 seconds until space is available
  • Your main session stays in the primary pane while agents work beside it

First run

On first run, cmux omo automatically sets up everything:

  1. Creates a shadow config at ~/.cmuxterm/omo-config/ with oh-my-opencode registered in the plugin array
  2. Installs the oh-my-opencode npm package using bun or npm if not already present
  3. Symlinks node_modules, package.json, and plugin config from your original ~/.config/opencode/ directory
  4. Enables tmux mode in the oh-my-opencode config (tmux.enabled defaults to false, cmux omo turns it on)

Your original ~/.config/opencode/ config is never modified. Running plain opencode works the same as before.

How it works

Same pattern as cmux claude-teams. A tmux shim intercepts tmux commands from oh-my-openagent's TmuxSessionManager and translates them into cmux API calls.

  • Creates a tmux shim at ~/.cmuxterm/omo-bin/tmux that redirects to cmux __tmux-compat
  • Sets TMUX and TMUX_PANE to simulate a tmux session
  • Enables tmux.enabled in the oh-my-opencode config (required for visual pane spawning)
  • Points OPENCODE_CONFIG_DIR at the shadow config
  • Prepends the shim directory to PATH and execs into opencode

Directories

PathPurpose
~/.cmuxterm/omo-bin/Contains the tmux shim script
~/.cmuxterm/omo-config/Shadow OpenCode config with oh-my-opencode plugin registered and tmux enabled (symlinks to your original config)
~/.cmuxterm/tmux-compat-store.jsonPersistent storage for tmux-compat buffers and hooks

Shadow config

cmux omo uses a shadow config directory so your original OpenCode setup is unaffected:

  • Copies your ~/.config/opencode/opencode.json with oh-my-opencode added to the plugin array
  • Symlinks node_modules, package.json, and bun.lock from the original directory
  • Writes oh-my-opencode.json with tmux.enabled set to true
  • Sets OPENCODE_CONFIG_DIR to the shadow directory before launching opencode

Environment variables

VariablePurpose
TMUXFake tmux socket path encoding the current cmux workspace and pane
TMUX_PANEFake tmux pane identifier mapped to the current cmux pane
OPENCODE_CONFIG_DIRPoints to the shadow config directory with oh-my-opencode enabled
CMUX_SOCKET_PATHPath to the cmux control socket for the shim to connect to