Visible Workspaces Make Agent Fleets Steerable

repoaiagentsorchestrationclituiinfrastructurepicmuxagent-loopstask-dag

Maps the joelclaw workflow-rig idea onto visible cmux workspaces, shared task DAGs, and steerable Pi workers instead of blind background jobs.

cmux becomes interesting when it stops being “a terminal multiplexer” and starts acting like the control plane for visible agents. This Joel-authored gist sketches Pi workers launched into real cmux workspaces, bound to a pi-tasks dependency graph, watched by a fleet dashboard, and still available for a human to jump in and steer.

The clever bit is refusing the usual invisible-worker bullshit. The spec keeps complex work in visible Pi sessions, then reserves pi --mode rpc and JSON-over-stdin for high-throughput chores like linting, formatting, and simple fixes. That split gives the orchestrator two modes: switchable humans-in-the-loop workspaces for risky work, and cheap headless workers for boring parallel work.

The shared state layer is the boring part in the best way. pi-tasks already has task DAGs, file-backed shared stores, file locking, auto-cascade, and subagent spawning via Pi’s EventBus. The gist adds cmux-aware execution strategies: workspace, rpc, subagent, and manual. That maps cleanly to joelclaw because the system already wants workload plans, resumability, visibility, and fewer mystery processes doing mystery shit.

The pattern worth stealing is the supervisor loop: spawn workers, track workspace refs, read screens, detect stalls, nudge, restart, abandon, and summarize. The gist pulls from dmux, pi-coordination, pi-boomerang, and Elixir OTP-style monitoring. The useful shape is not “more agents.” It’s agents with lifecycle, attention, ownership, and a visible place to stand.

Key Ideas

  • cmux workspaces can make Pi workers visible, steerable, and auditable instead of hiding them as background subprocesses.
  • The proposed spawn_pi tool launches a worker Pi session with scoped cwd, model, skills, task ID, and workspace name, then binds it to shared fleet state.
  • pi-tasks provides the orchestration backbone: dependency DAGs, shared file stores, file locking, auto-cascade, and task ownership.
  • The fleet dashboard combines in-memory agent state, cmux tree / read-screen data, and pi-tasks progress into one terminal view.
  • The Pi RPC bridge gives a second execution lane for headless workers controlled with JSON-over-stdin.
  • Cross-session coordination starts simple: shared pi-tasks files for state, cmux send / read-screen for steering, and Redis pub/sub or Unix sockets only when polling is too slow.
  • The spec steals the right operational patterns: dmux-style pane analysis, pi-coordination-style phase pipelines, pi-boomerang-style execute-and-collapse summaries, and Elixir OTP-style supervision.