How the OpenTmux wrapper works
mainThe wrapper script ensures that the agent-tmux plugin can always spawn panes by guaranteeing that OpenCode is running inside a tmux environment. It uses the $TMUX environment variable to make this decision:
- If
$TMUXis not set: The script executestmux new-session "opencode --port 4096". - If
$TMUXis set: The script executesopencode --port 4096directly.