TIL : OpenCode supports multiple parallel sessions via its server architecture
Note, July 2026: setup from the OpenCode era — the same client/server architecture exists on Claude Code (detachable sessions, multiple instances).
OpenCode is built on a client/server architecture — each TUI instance is a client that connects to a local server process. This means you can open multiple independent sessions in parallel across different tmux splits, each with its own context and its own model.
# Horizontal tmux split — two independent OpenCode sessions
tmux split-window -h 'opencode'
# Check active processes
ps aux | grep opencode
# → two distinct processes, two isolated contexts
In practice: one agent on backend refactoring in the left split, one agent on the corresponding tests in the right split. Sessions don’t share context — that’s intentional, it avoids cross-contamination.
The trade-off: each session consumes its own context window and bills independently. Two Sonnet sessions in parallel = twice the cost. For parallel mechanical tasks, that’s the right time to switch to a free model via Kilo Gateway.
Further reading