Orchestration lets you run multiple Claude Code instances and direct work to each one from a single web UI.
- Start vibecraft server:
npm run server - Open the web UI
- Click "+ New" in the Sessions panel to spawn a Claude
- Click on a session to select it as the prompt target
- Type a prompt and send - it goes to the selected session
A managed session is a Claude Code instance that vibecraft spawned and controls:
- Has a user-friendly name ("Frontend", "Tests", etc.)
- Tracked status:
idle,working,offline - Shows current tool when working
- Can receive prompts from the web UI
If you're running Claude Code in a tmux session called claude (the default), vibecraft can observe and prompt it, but it won't appear in the managed sessions list. This is "legacy mode" - it works but isn't part of orchestration.
┌──────────────────────────────────────────────────────────────┐
│ Vibecraft Server │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Session 1 │ │ Session 2 │ │ Session 3 │ ... │
│ │ "Frontend" │ │ "Tests" │ │ "Refactor" │ │
│ │ │ │ │ │ │ │
│ │ tmux: │ │ tmux: │ │ tmux: │ │
│ │ vibecraft- │ │ vibecraft- │ │ vibecraft- │ │
│ │ a1b2c3d4 │ │ e5f6g7h8 │ │ i9j0k1l2 │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ WebSocket: broadcasts session updates to UI │
│ REST API: create, list, update, delete sessions │
└──────────────────────────────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────┐
│ Web UI │
│ │
│ ┌─────────────────────────────────────┐ │
│ │ Sessions [+ New] │ │
│ │ ┌─────────────────────────────────┐ │ │
│ │ │ ● Frontend ✏️ 🗑️ │ │ ← Click to select │
│ │ │ Ready │ │ │
│ │ ├─────────────────────────────────┤ │ │
│ │ │ ◐ Tests ✏️ 🗑️ │ │ ← Working │
│ │ │ Using Bash │ │ │
│ │ └─────────────────────────────────┘ │ │
│ └─────────────────────────────────────┘ │
│ │
│ Prompt: [________________________] [Send] │
│ → Frontend │
└──────────────────────────────────────────────────────────────┘
GET /sessions
# Response
{
"ok": true,
"sessions": [
{
"id": "uuid",
"name": "Frontend",
"tmuxSession": "vibecraft-a1b2c3d4",
"status": "idle",
"createdAt": 1234567890,
"lastActivity": 1234567890,
"cwd": "/path/to/project"
}
]
}POST /sessions
Content-Type: application/json
{"name": "Frontend"} # name is optional, defaults to "Claude N"
# Response
{
"ok": true,
"session": { ... }
}PATCH /sessions/:id
Content-Type: application/json
{"name": "New Name"}
# Response
{
"ok": true,
"session": { ... }
}DELETE /sessions/:id
# Response
{"ok": true}POST /sessions/:id/prompt
Content-Type: application/json
{"prompt": "Write a test for the login function"}
# Response
{"ok": true}POST /sessions/:id/cancel
# Response
{"ok": true}The server broadcasts session updates via WebSocket:
// Full session list (on connect and after changes)
{ type: 'sessions', payload: ManagedSession[] }
// Single session update
{ type: 'session_update', payload: ManagedSession }| Status | Meaning |
|---|---|
idle |
Ready for prompts, not currently working |
working |
Executing a tool (shows which tool) |
offline |
tmux session died or was killed externally |
For managed sessions to report events back to vibecraft, Claude Code hooks must be configured globally. The hooks send events to the vibecraft server, which then:
- Updates the session's
statusandcurrentTool - Broadcasts the update to all connected UI clients
- Shows the activity in the 3D visualization
- Templates: Pre-configured session types ("Test Runner", "Code Reviewer")
- Workflows: Chain prompts across multiple sessions
- Auto-scaling: Spawn sessions based on workload
- Session Groups: Organize related sessions together