Skip to content

Conductor reference

CLI verbs, JSON-RPC methods, fields, events, config keys, and exit codes for the Paneflow Conductor control plane.

This page is the compact reference for Conductor. It names the public surface and the fields a script or LLM can rely on.

CLI verbs

VerbPrimary methodUse
ps [--json]fleet.listList detected agents across workspaces
status <target> [--json]surface.statusRead one pane's agent state
watch [--surface <sel>] [--type <event>]events.subscribeStream lifecycle events and surface changes
read <target>surface.readRead pane scrollback
send <target> <text>surface.send_textStage or submit text to a pane
wait --match <sel>surface.read, event stream when idle mode is usedBlock until idle state, a regex, or both
up <file>workspace orchestrationCreate a declarative agent workspace
flow run <file>flow orchestrationRun a multi-agent pipeline
ls, search, focus, keyscripting methodsUse lower-level pane automation when conductor state is not enough

Read operations are allowed by default. Writes such as send --submit, key, and flow steps that submit text require the scripting gate or AI free access mode.

Selectors

SelectorExampleNotes
Numeric idpaneflow status 42Exact pane id
Namepaneflow status backendBest selector for conductor workflows
cmdline:<substr>paneflow read cmdline:claudeUseful but less portable than a pane name
cwd:<path>paneflow read cwd:/home/me/appGood for repo-scoped scripts

A selector that matches nothing or several panes exits with code 3, except commands that explicitly accept multiple matches such as broadcast sends or wait --any and wait --all.

fleet.list

paneflow ps --json returns an agents array.

FieldMeaning
pidAgent process id, or null for scan-only detection
toolAgent family such as claude, codex, opencode, or gemini
statethinking, waiting_for_input, finished, errored, stalled, idle, or unknown_running
hookedtrue when Paneflow receives lifecycle hook events
reasonDetection reason, including no_hook for unhooked processes
surface_idPane id when resolved
surface_namePane name when present
workspaceWorkspace index
active_tool_nameTool currently running inside the agent, when reported
messageWaiting question or permission text, when reported
last_resultLast turn summary, when the hook provides one
waiting_msMilliseconds spent waiting for input
idle_msMilliseconds since the last observed activity

An empty fleet is {"agents":[]} with exit code 0.

surface.status

paneflow status <target> --json returns one pane status.

FieldMeaning
surface_idPane id
stateSame state vocabulary as fleet.list
hookedWhether lifecycle tracking is active
toolAgent family, when detected
active_tool_nameTool currently running, when reported
messageWaiting question or permission text, when reported
last_resultLast turn summary, when available
waiting_msMilliseconds spent waiting for input
idle_msMilliseconds since the last observed activity
output_generationMonotonic counter that advances when pane output changes

A pane with no active agent returns an idle state instead of an error.

surface.read

paneflow read <target> returns terminal text. By default, output is wrapped in <untrusted_terminal_output> so an LLM can inspect it without treating it as instructions. Use --raw only for trusted human scripts.

Useful fields in JSON mode include text, lines, total_lines, eof, and output_generation.

events.subscribe and watch

paneflow watch is newline-delimited JSON. It may emit:

Event typeMeaning
ai.session_startAn agent session begins
ai.prompt_submitA prompt is submitted
ai.tool_useThe agent invokes a tool
ai.notificationThe agent asks a question or requests permission
ai.stopA turn ends
ai.exitThe agent process exits
ai.session_endThe session closes
surface_changedThe pane's output_generation advanced

Control frames are also valid:

FrameMeaning
subscribedSubscription acknowledged
heartbeatKeepalive frame
droppedThe subscriber lagged and events were shed

When a client receives dropped, it should resync with paneflow ps --json or paneflow status <target> --json.

wait

wait --idle uses the event stream when available and falls back safely when needed. wait --pattern polls recent scrollback every 500 ms and scans the latest 500 lines.

ModeExampleUse
Idlepaneflow wait --match reviewer --idle --timeout 600Continue after the agent stops producing work
Patternpaneflow wait --match backend --pattern '^DONE:' --timeout 300Continue after a sentinel line
Idle plus patternpaneflow wait --match reviewer --idle --pattern '^REPORT_DONE' --timeout 600Require both a stable pane and a marker
Any or allpaneflow wait --match 'cmdline:claude' --pattern 'tests passed' --allCoordinate multiple panes in pattern mode

Timeouts exit with code 4.

Config keys

KeyDefaultMeaning
ai_unrestrictedfalseAllows trusted AI automation to submit when enabled
ai_injection_fencetrueWraps peer terminal output as untrusted text
agent_stall_threshold_secsapp defaultMarks silent in-progress turns as stalled

Exit codes

CodeMeaning
0Success
1Runtime failure
2CLI usage error
3Target not found or ambiguous
4wait timeout