Agent run oversight

The existing project Agents page includes a State filter and Run details in Recent runs. It shows the newest loaded history (currently up to 50 records), never a server-wide total. The selected run remains visible when its state changes outside the filter. Launch, registration, runner confirmation and Stop keep their existing APIs and admission rules. agents.launch remains server controlled and on by default (all since the recorded 2026-10-04 owner decision). An operator can disable it per org; launch still requires the existing signed-in person, recent-auth, project permission and registered-daemon authority.

Details show the run ID, server and configured harness name, queue/claim/start/finish times, execution elapsed, server failure reason, exit status and summary. Missing or invalid timestamps stay unknown; running time is explicitly live elapsed, not billing. lease_expired means failure with unknown effects, never a safe automatic retry. Completion comes from the launch DTO, never status or log prose.

Only the selected run reads activity, at the existing three-second cadence while active. Sequence numbers identify activity; repeats collapse and events sort by sequence. The view retains the newest 2,000 loaded events. A contiguous sequence watermark keeps gaps eligible for later reads (for example, 3 may arrive before 1/2). A separate page cursor drains full 500-event server pages, including beyond a persistent gap; after the last page active reads return to the watermark. This may replay records while a gap remains, with duplicates collapsed and no unbounded sequence tracking. Terminal runs drain full pages, then stop. Selection switches and unmount abort/ignore outstanding reads and clear timers. A transient failure preserves prior activity and exposes Retry activity. Authorization/unavailable responses fence further detail reads and Stop; prior activity is concealed. Every new read and cancel still goes through current server permission checks. A hidden feature and a removed project may share 404; the UI does not claim which caused it.

Artifact names render as escaped text without links or HTML. Browser credential masking supplements server redaction. No prompt export, credential copying or model requests are added. The details view does not display the prompt returned by the existing authorized endpoint.

Cost not reported. This server-run DTO has no authoritative model, token or billing fields. Harness/account billing is external. Elapsed time cannot support a charge, a zero-cost claim or an inferred account/model. Aggregate usage routes elsewhere do not establish per-launch attribution.

Stop calls the existing cancel endpoint and reads back server state. A running cancel request is Stopping until acknowledged; acceptance alone is never Stopped or Succeeded. This view offers no Resume or Rerun action.

Validation lives in the colocated runner/model/oversight tests and apps/api/test/agent-run-oversight-journey.test.ts. The latter uses the approved disposable PG fixture, registered synthetic daemon messages, registered MCP get_agent_launch and the production Next application in Chromium. It launches no harness/provider/model. Build prerequisites and exact commands are recorded in the lane result. Parent integration and configured independent Terra review remain separate from this prepared topic; no release is performed here.

Lifecycle references: React effect cleanup, fetch cleanup and stale responses, existing TanStack polling. The local installed Next use-client guide was read before component changes.

We use essential cookies to keep you signed in. See our Privacy Policy for details.