Use tmux or Zellij to watch subagents work in live panes while OpenCode keeps running in your main session.
When OpenCode launches child agent sessions, oh-my-opencode-slim can open panes for those sessions automatically.
OpenCode running in tmux with live subagent panes.
⚠️ Current workaround: Start OpenCode with
--portto enable multiplexer integration. The port must match theOPENCODE_PORTenvironment variable. This is required until opencode#9099 is resolved.
If you open multiple OpenCode sessions, use a random high port for each launch instead of hard-coding 4096.
Bash helper:
omos() {
local port
port=$(jot -r 1 49152 65535)
OPENCODE_PORT="$port" \
opencode --port "$port" "$@"
}
Edit ~/.config/opencode/oh-my-opencode-slim.json (or .jsonc):
Auto-detect (recommended):
{
"multiplexer": {
"type": "auto",
"layout": "main-vertical",
"main_pane_size": 60
}
}
Tmux only:
{
"multiplexer": {
"type": "tmux",
"layout": "main-vertical",
"main_pane_size": 60
}
}
Zellij only:
{
"multiplexer": {
"type": "zellij"
}
}
Tmux:
tmux
opencode --port 4096
Zellij:
zellij
opencode --port 4096
Ask OpenCode to do something that launches subagents. New panes should appear automatically.
Example:
Please analyze this codebase and create a documentation structure.
{
"multiplexer": {
"type": "auto",
"layout": "main-vertical",
"main_pane_size": 60
}
}
| Setting | Type | Default | Description |
|---|---|---|---|
type |
string | "none" |
"auto", "tmux", "zellij", or "none" |
layout |
string | "main-vertical" |
Layout preset for tmux; mapped to Zellij pane directions where possible |
main_pane_size |
number | 60 |
Main pane size percentage for tmux only (20-80) |
zellij_pane_mode |
string | "agent-tab" |
Zellij pane placement: "agent-tab" creates/reuses a dedicated tab; "current-tab" opens panes in the tab containing the parent OpenCode pane |
| Multiplexer | Status | Notes |
|---|---|---|
| Tmux | ✅ Supported | Full layout control with main-vertical, main-horizontal, tiled, and more |
| Zellij | ✅ Supported | Creates a dedicated opencode-agents tab by default; can open panes in the parent OpenCode tab with zellij_pane_mode: "current-tab"; maps main-* layouts to pane directions |
Example: open Zellij subagents in the parent OpenCode tab
{
"multiplexer": {
"type": "zellij",
"zellij_pane_mode": "current-tab"
}
}
In current-tab mode, panes are targeted to the tab that contains the parent
OpenCode pane, even if another Zellij tab is focused when a subagent starts.
If the parent pane cannot be resolved, it falls back to the currently focused
tab.
Older configs still work:
{
"tmux": {
"enabled": true,
"layout": "main-vertical",
"main_pane_size": 60
}
}
This is converted automatically to multiplexer.type: "tmux".
Tmux supports full layout control and main pane sizing. Zellij maps only the
main-* layout settings to pane creation directions; exact main_pane_size
rebalancing is tmux-only.
| Layout | Description |
|---|---|
main-vertical |
Your session on the left, agents stacked on the right |
main-horizontal |
Your session on top, agents stacked below |
tiled |
All panes in an equal-sized grid |
even-horizontal |
All panes side by side |
even-vertical |
All panes stacked vertically |
For Zellij:
| Layout | Zellij behavior |
|---|---|
main-vertical |
Opens new subagent panes to the right |
main-horizontal |
Opens new subagent panes down |
even-horizontal |
Uses Zellij's native pane placement |
even-vertical |
Uses Zellij's native pane placement |
tiled |
Uses Zellij's native pane placement |
Example: wide-screen layout
{
"multiplexer": {
"type": "tmux",
"layout": "main-horizontal",
"main_pane_size": 50
}
}
Example: maximum parallel visibility
{
"multiplexer": {
"type": "tmux",
"layout": "tiled",
"main_pane_size": 50
}
}