Overview
ThehostedLoopState field is included on improve-run detail, source detail, and proposal detail API responses. It gives a single, authoritative view of where a skill sits in the hosted improve loop — stage, status, any active blocker, and which surface should handle the next action.
UI consumers should render directly from this object without reinterpreting other response fields.
Stages
The loop progresses through six ordered stages:| Stage | Meaning |
|---|---|
connect | Skill source is being connected and validated |
prepare | Baseline evals and configuration are being established |
improve | Active improvement run is in progress |
review | A proposal is awaiting review before it can be applied |
apply | An approved proposal is being applied to the skill |
observe | The deployed change is being monitored for regressions |
Status
Each stage exposes a status that describes its observable state:| Status | Meaning |
|---|---|
ready | Stage is queued but not yet started |
running | Stage is actively executing |
blocked | Stage is paused due to a blocker that must be resolved |
needs_review | Human review is required before the loop can continue |
observing | Post-deploy monitoring window is active |
completed | Stage finished successfully |
Fields
| Field | Type | Description |
|---|---|---|
stage | HostedLoopStage | Current stage in the loop |
status | HostedLoopStatus | Observable state of that stage |
checkpointKind | HostedLoopCheckpointKind | Kind of checkpoint the loop is stopped at, if any |
recommendedSurface | HostedLoopRecommendedSurface | Which UI surface should surface the next action |
canAutoContinue | boolean | Whether the loop can proceed without human input |
summary | string | Human-readable summary of the current state |
blockingReason | string | null | Why the loop is blocked, if applicable |
systemNextAction | string | null | What the system will do next, if anything |
humanNextAction | string | null | What a human should do next, if anything |
blockerClass | HostedLoopBlockerClass | Classification of the active blocker |
remediationState | HostedLoopRemediationState | Lifecycle of the active remediation attempt |
Checkpoint kinds
| Kind | Meaning |
|---|---|
none | No checkpoint; loop is not stopped |
system_remediation | System is automatically attempting to resolve the blocker |
ai_remediation | An AI-assisted remediation pass is running or awaiting review |
human_policy | A policy requires human sign-off before the loop can continue |
Blocker classes
| Class | Meaning |
|---|---|
none | No active blocker |
deterministic | Blocker has a known, rule-based resolution path |
ai_assisted | Blocker requires an AI remediation pass |
human_policy | Blocker requires a human decision |
Remediation states
| State | Meaning |
|---|---|
idle | No remediation is active |
scheduled | Remediation is queued but not yet started |
running | Remediation is executing |
awaiting_review | Remediation produced a proposal that needs human review |
failed | Remediation could not resolve the blocker |
escalated | Blocker has been escalated for manual intervention |
Recommended surface
TherecommendedSurface field tells you which page in the dashboard is most relevant for the current state:
| Value | Surface |
|---|---|
source | Source detail page |
run | Improve-run detail page |
proposal | Proposal detail page |
Which endpoints include this field
- Improve-run detail —
GET /api/improve-runs/:id(see Improve Runs) - Source detail —
GET /api/sources/:id(see Sources) - Proposal detail —
GET /api/proposals/:id/detail(see Proposals)