Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-split-view

Split-screen monitor for opencode subagents — watch your master agent and every subagent work side by side in the terminal.

License: MIT opencode PRs Welcome


A TUI plugin for opencode that gives you a split view of your AI coding session: the master agent on the left, all active subagents on the right — updating live every 2 seconds. No more tab-flipping between sessions to see what your subagents are doing.

┌─ master · running ──────────────┬─ explorer · running ──┬─ reviewer · running ─┐
│  I'm refactoring the auth flow  │  searching for         │  reviewing the diff   │
│  ── step ──                     │  middleware patterns   │  ⚙ task [running]     │
│  📄 src/auth.ts                 │  ── step ──            │  ── step ──           │
│  ⚙ edit [running]               │  🔍 src/api/routes/    │  📄 src/auth.ts       │
│  …(reasoning)…                  │  👤 agent              │  …(reasoning)…        │
│                                 │  📸 snapshot           │  📸 snapshot          │
└─────────────────────────────────┴────────────────────────┴──────────────────────┘

Features

  • 👁 Live split-screen — master agent + all active subagents in one view
  • Real-time polling — refreshes every 2 seconds, no manual reload
  • 🧠 Smart filtering — only shows subagents that worked in the last 3 minutes; idle ones drop out automatically
  • ⌨️ One-key togglectrl+x z to enter/leave split view (also available in the command palette: Split view: toggle)
  • 🎨 Theme-aware — uses your active opencode theme colors for panes and borders
  • 📊 Status badges — per-session status (running, waiting, …) right in the pane title
  • 🪶 Zero-config — works out of the box, no setup beyond installing the plugin

Requirements

  • opencode with TUI plugin support
  • bun (only to build from source)

Installation

Option A — from this repo (recommended)

git clone https://github.com/thegalkin/opencode-split-view.git ~/.config/opencode/plugins/opencode-split-view
cd ~/.config/opencode/plugins/opencode-split-view
bun install && bun run build

Then add it to your TUI config (~/.config/opencode/tui.json):

{
  "plugin": [
    "file:///home/USER/.config/opencode/plugins/opencode-split-view"
  ]
}

Option B — npm (once published)

opencode plugin add opencode-split-view

or add it manually:

{
  "plugin": ["opencode-split-view"]
}

Usage

  1. Open any session in opencode
  2. Press ctrl+x z — the TUI switches to split view
  3. Watch your master agent (left pane) and subagents (right panes) in real time
  4. Press ctrl+x z again to return to the normal session view

The command is also registered in the command palette (ctrl+pSplit view: toggle) under the Split category.

Tip: start a task with subagents (task(...)), then toggle split view to see all of them work simultaneously.

How it works

The plugin:

  1. Reads the currently open session via the opencode TUI plugin API
  2. Polls session.children() every 2 seconds for subagent sessions
  3. Filters subagents by their time.updated — only sessions active within the last 180 seconds are shown
  4. Renders each session's message parts (text, tools, files, agents, reasoning) into its own bordered pane
  5. Re-navigates the plugin route with a fresh snapshot so the view stays live

Configuration

Constant Default Purpose
POLL_MS 2000 Refresh interval for the split view
ACTIVE_WINDOW_MS 180000 How long a subagent stays visible after its last activity

To tune these, edit the constants at the top of src/render.tsx and rebuild.

Development

bun install
bun run typecheck   # tsc --noEmit
bun run build       # bundles src/render.tsx -> dist/tui.js

Project layout

opencode-split-view/
├── src/
│   └── render.tsx      # plugin source (JSX, @opentui/solid)
├── dist/
│   ├── index.js        # server entry stub (TUI-only plugin)
│   └── tui.js          # built TUI entrypoint
├── package.json        # npm package manifest, peer deps, exports
└── tsconfig.json

Why split view?

When opencode runs subagents in parallel, each one gets its own session. The default TUI only shows one at a time — you lose track of what the others are doing. opencode-split-view turns your terminal into an ops dashboard for your whole agent team: kick off a parallel task, open split view, and watch every agent's progress simultaneously. Built for people who run multi-agent workflows and want full visibility without leaving the TUI.

License

MIT

About

opencode-split-view: split-screen TUI plugin for opencode — watch your master agent and subagents work side by side in real time. Toggle with ctrl+x z.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages