claude-session-driver plugin
A plugin that turns one Claude Code session into a controller handing tasks to workers in tmux and collecting their results.
- 114 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Workers start with confirmations bypassed and run commands and edits without asking.
- For Codex and Pi your login is copied into the worker.
Install
- Works in
Manual install
claude plugin install claude-session-driver@superpowers-marketplaceRequires tmux and the chosen harness CLI. If the marketplace cache is stale, run `claude plugin marketplace update superpowers-marketplace` first.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Workers start with confirmations bypassed and run commands and edits without asking.
- For Codex and Pi your login is copied into the worker.
This is third-party code. Review the repository files before installing.
What it does
The plugin adds the `csd` CLI and the `driving-claude-code-sessions` skill. A main session launches workers in tmux (Claude Code, Codex or Pi), gives each a task, follows progress and collects answers. Workers run in parallel and the controller decides what to do with their output. Each worker writes lifecycle events to JSONL: session start, submitted prompt, tool calls with name and input, stop. The command set is the same across all three harnesses: `launch`, `send`, `converse`, `wait-for-turn`, `read-turn`, `read-events`, `status`, `stop`, `handoff`. The skill describes patterns: delegate and wait, fan out, build a pipeline, hold a dialogue with a worker, hand a session to a human.
Who it is for. Developers who run several coding-agent sessions at once and want to manage them from one main session.
Good fit when
- Three independent tasks in different directories run in parallel and the main session waits for all three.
- One worker's output feeds the next worker in a chain.
- A working session has to be handed to a human in tmux midway.
- After a machine reboot, workers are brought back with the `recover-workers.sh` script.
Not a fit when
- The task fits a single session with no parallelism.
- Running agents with confirmations disabled is not allowed.
- The machine has no tmux.
Example request
Launch two workers: one updates the tests in the api directory, the other writes a migration in the db directory. Wait for both.Limitations
tmux and at least one harness CLI are required: `claude`, `codex` or `pi`; node ships with Claude Code. Workers start with confirmations bypassed and run tool calls without asking, while events are observed only and block nothing. A one-time consent, `csd grant-consent`, comes before the first launch. For Codex and Pi the plugin copies your login from `~/.codex` and `~/.pi/agent` into the worker. The `adopt` command works with Claude only.
How to disable. Uninstall the plugin with Claude Code, stop workers with `stop` and clear the `/tmp/csd-workers` directory.
FAQ
How do I install claude-session-driver?
Run `claude plugin install claude-session-driver@superpowers-marketplace`. If the marketplace cache is stale, run `claude plugin marketplace update superpowers-marketplace` first.
How do I launch a worker on Codex?
Pass the flag: `csd launch --harness codex my-task /path/to/project`. The default is `claude`, the third option is `pi`.
How do I get a worker's answer?
Call `read-turn` for the last turn or `converse` to send a prompt and receive the answer at once. Events are read with `read-events`.
What does the plugin need?
tmux and the CLI of at least one harness: `claude`, `codex` or `pi`. No separate `jq` is required.
Where are worker events written?
To a JSONL file: session start, submitted prompt, tool calls, stop and session end. The `events-file` command prints the path.
Discussion
No questions or reviews yet.
Related
PluginsMulti-agent orchestration for Claude Code: teams, roles, autopilot and task routing across skills and subagents
Workflows for Claude Code: /do, /omo, /bmad-pilot and more commands, with Codex, Gemini or OpenCode writing the code through codeagent-wrapper
A Claude Code plugin that hands coding tasks to Codex agents, monitors them and verifies the results independently
A terminal app for running several Claude Code, Codex, Gemini CLI and Aider sessions in parallel, each in its own tmux session and git worktree
An environment for Claude Code that keeps context across sessions via hooks, ledgers and handoffs, orchestrates agents and saves tokens
claude-mods adds 112 skills, 3 agents and 3 commands to Claude Code: stacks, agent operation, defense, session continuity.
README in short
The plugin installs through the Claude Code marketplace. Control then goes through the single `csd` binary and shims at `/tmp/csd-workers/bin/<name>`, and the hooks are written in node.
README badge
Original SKILL.md
--- name: driving-claude-code-sessions description: Use when acting as a project manager that delegates tasks to other coding-agent sessions (Claude Code, Codex, or Pi) - launch workers, assign them work, monitor progress, review their tool calls, and collect results --- # Driving Coding-Agent Sessions ## Overview You can launch coding-agent sessions — Claude Code, Codex, or Pi — as "workers" in tmux, send them prompts, wait for them to finish, read their output, and hand them off to a human. Workers run with permissions bypassed, so they execute tool calls without prompting. Each worker emits lifecycle events to a JSONL file so the controller can observe what it's doing — Claude and Codex through their hook systems, Pi through a native extension `csd` loads into it. All operations go through a single CLI: `csd`. After launching a worker, the controller receives a **shim path** at `/tmp/csd-workers/bin/<tmux-name>` that bakes in the worker handle. Every per-worker operation goes through that path — no positional state to thread between calls, no absolute skill path to prepend. A small set of environment variables tune behavior; see [Environment variables](#environment-variables) at the bottom. (The worker dir moved from `/tmp/claude-workers` to `/tmp/csd-workers`; when the default path is in use, `csd` creates a back-compat symlink `/tmp/claude-workers → /tmp/csd-workers`, so old paths and muscle memory still resolve.) The shim path is deterministic: if you pick a memorable tmux name at launch, you can reconstruct `/tmp/csd-workers/bin/<tmux-name>` whenever you need it. For agents driving via tool calls, that's the right model — shell state doesn't persist between calls, so a `SHIM=...; $SHIM cmd` pattern just adds noise. The examples below use the bare path. ## Harnesses Pick a harness with `--harness` at launch (default `claude`): ```bash $SKILL/csd launch --harness codex my-task /path/to/project $SKILL/csd launch --harness pi my-task /path/to/project ``` The controller-facing command surface is **identical across all three harnesses** — `launch`, `send`, `converse`, `wait-for-turn`, `read-turn`, `read-events`, `status`, `stop`, and `handoff` behave the same regardless of harness. A few things differ: - **Auth.** Each harness authenticates from its own home — Claude `~/.claude`, Codex `~/.codex`, Pi `~/.pi/agent`. `csd` stages that login into the worker at launch, so to rotate credentials, relaunch. - **`adopt` is Claude-only.** Claude takes a caller-assigned session id, so a session can be resumed by id (`claude --resume`). Codex and Pi mint their own ids on the first prompt and offer no resume-by-id — relaunch them instead. - **Codex isn't queryable until its first prompt.** Codex mints its session id only when you send the first prompt, so between `launch` and the first `send`/`converse` a codex worker's `status`, `session-id`, and `wait-for-turn` return `no worker known` — it *is* running, it just hasn't registered yet. `converse` handles this internally, so the typical launch→converse path is fine; only the lower-level commands see the gap. (Claude takes its id at launch and Pi registers at launch, so both are queryable immediately.) ## Prerequisites - **tmux** - a harness CLI — at least the one you launch: **claude** (default), **codex**, or **pi** (No `jq` and no bash hooks: `csd` is a TypeScript/node tool and its hooks are node programs. `node` is required, but it's already present wherever Claude Code runs.) ## Setup The CLI lives at `<skill>/scripts/csd`. Top-level subcommands need the skill path: - `csd launch [--harness <claude|codex|pi>] <tmux-name> <cwd> [-- harness-args...]` — bootstrap a worker (harness defaults to `claude`) - `csd adopt <tmux-name> <cwd> <session-id> [-- claude-args...]` — re-adopt an existing Claude session as a worker (claude-only; see [Recovering workers](#recovering-workers-after-a-reboot)) - `csd list [--all]` — enumerate workers - `csd grant-consent` — one-time consent for running workers with permissions bypassed Once a worker is launched, run subsequent commands against `/tmp/csd-workers/bin/<tmux-name>`: