Motivation
The orchestrator drives builds with launch_session → then verifies via get_active_sessions. But get_active_sessions reads transcript files on disk, so it's blind to a tile that's open but hasn't run a turn yet — exactly the state after a launch whose prompt is prefilled-but-not-submitted (auto-send is non-deterministic), or that's still booting (~1 min lag). Two recurring failures:
- Can't confirm a launch took until the child runs its first turn (~1 min), and can't distinguish waiting-for-Enter vs booting vs injection-failed.
- Which-tile-is-which ambiguity — same-project tiles look identical (no per-tile title yet), and a resurfacing old session can be mistaken for the just-launched one. (Live example: after launching a fix session,
get_active_sessions surfaced only an old, already-completed session while the just-launched tile hadn't registered — so the launch couldn't be confirmed without a human eyeballing the cockpit.)
Proposal — surface the live cockpit tile roster
cldctrl already knows the live tile state server-side (the cockpit frontend rendered these tiles). Expose it, best-to-good:
- Structured (preferred):
get_cockpit_tiles() → each open tile as { sessionId/tileId, project, title, status: running | waiting-for-input | idle | booting, promptPreview }, including tiles that haven't run a turn yet. Resolves both problems with no DOM scraping.
- Visual fallback: a screenshot / Playwright-accessibility snapshot of the cockpit grid, so the orchestrator can literally see all open windows + their state. (Owner's framing: "give the agent a Playwright MCP tool as part of cldctrl so it can just see all the open windows.")
Relationship to other cldctrl ideas
Motivation
The orchestrator drives builds with
launch_session→ then verifies viaget_active_sessions. Butget_active_sessionsreads transcript files on disk, so it's blind to a tile that's open but hasn't run a turn yet — exactly the state after a launch whose prompt is prefilled-but-not-submitted (auto-send is non-deterministic), or that's still booting (~1 min lag). Two recurring failures:get_active_sessionssurfaced only an old, already-completed session while the just-launched tile hadn't registered — so the launch couldn't be confirmed without a human eyeballing the cockpit.)Proposal — surface the live cockpit tile roster
cldctrl already knows the live tile state server-side (the cockpit frontend rendered these tiles). Expose it, best-to-good:
get_cockpit_tiles()→ each open tile as{ sessionId/tileId, project, title, status: running | waiting-for-input | idle | booting, promptPreview }, including tiles that haven't run a turn yet. Resolves both problems with no DOM scraping.Relationship to other cldctrl ideas
wait_for_session) — both are the orchestrator observing child sessions.launch_sessionv2 wishlist (return the created tile id + a per-tile title/label): returned-id lets the orchestrator target a tile, a live roster lets it see one. Together they end the guessing.