Type: Backend
Description
Today the frontend polls /capture once per active session to learn each agent's busy/idle state. For a multi-repo "which agents are working" overview, provide a single lightweight status endpoint so the count of network calls doesn't scale with session count.
Acceptance Criteria
GET /v1/instances/:id/coding/status returns { runnerConnected: boolean, sessions: Array<{ sessionId, repoId, runState, runnerConnected }> }.
- Returns quickly without dumping full terminal panes (status only — cheaper than
/capture).
- Owner-scoped; reflects only the caller's sessions.
Technical Notes
- File:
workers/api/src/routes/coding.ts. Reuse the runtime/relay status plumbing that /capture already uses, minus the pane payload. Frontend then replaces its per-session /capture status fan-out (in CodingTab.pollStatuses) with this one call.
- Trade-off: current per-session polling already works and is simple; this is an optimization for many concurrent sessions. Defer unless session counts grow.
Dependencies
None (enhances CODER-005).
Type: Backend
Description
Today the frontend polls
/captureonce per active session to learn each agent's busy/idle state. For a multi-repo "which agents are working" overview, provide a single lightweight status endpoint so the count of network calls doesn't scale with session count.Acceptance Criteria
GET /v1/instances/:id/coding/statusreturns{ runnerConnected: boolean, sessions: Array<{ sessionId, repoId, runState, runnerConnected }> }./capture).Technical Notes
workers/api/src/routes/coding.ts. Reuse the runtime/relay status plumbing that/capturealready uses, minus the pane payload. Frontend then replaces its per-session/capturestatus fan-out (inCodingTab.pollStatuses) with this one call.Dependencies
None (enhances CODER-005).