Skip to content

Live cockpit-tile roster — get_active_sessions is blind to open/waiting tiles that haven't run a turn #22

Description

@RyanSeanPhillips

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:

  1. 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.
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions