Skip to main content

Overview

The hostedLoopState 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:
StageMeaning
connectSkill source is being connected and validated
prepareBaseline evals and configuration are being established
improveActive improvement run is in progress
reviewA proposal is awaiting review before it can be applied
applyAn approved proposal is being applied to the skill
observeThe deployed change is being monitored for regressions

Status

Each stage exposes a status that describes its observable state:
StatusMeaning
readyStage is queued but not yet started
runningStage is actively executing
blockedStage is paused due to a blocker that must be resolved
needs_reviewHuman review is required before the loop can continue
observingPost-deploy monitoring window is active
completedStage finished successfully

Fields

{
  "hostedLoopState": {
    "stage": "improve",
    "status": "blocked",
    "checkpointKind": "ai_remediation",
    "recommendedSurface": "run",
    "canAutoContinue": false,
    "summary": "Run is blocked waiting for AI-assisted remediation of a failing eval.",
    "blockingReason": "3 evals are failing with no passing candidates.",
    "systemNextAction": "Retry improve run after remediation completes.",
    "humanNextAction": "Review the remediation proposal and approve or reject it.",
    "blockerClass": "ai_assisted",
    "remediationState": "awaiting_review"
  }
}
FieldTypeDescription
stageHostedLoopStageCurrent stage in the loop
statusHostedLoopStatusObservable state of that stage
checkpointKindHostedLoopCheckpointKindKind of checkpoint the loop is stopped at, if any
recommendedSurfaceHostedLoopRecommendedSurfaceWhich UI surface should surface the next action
canAutoContinuebooleanWhether the loop can proceed without human input
summarystringHuman-readable summary of the current state
blockingReasonstring | nullWhy the loop is blocked, if applicable
systemNextActionstring | nullWhat the system will do next, if anything
humanNextActionstring | nullWhat a human should do next, if anything
blockerClassHostedLoopBlockerClassClassification of the active blocker
remediationStateHostedLoopRemediationStateLifecycle of the active remediation attempt

Checkpoint kinds

KindMeaning
noneNo checkpoint; loop is not stopped
system_remediationSystem is automatically attempting to resolve the blocker
ai_remediationAn AI-assisted remediation pass is running or awaiting review
human_policyA policy requires human sign-off before the loop can continue

Blocker classes

ClassMeaning
noneNo active blocker
deterministicBlocker has a known, rule-based resolution path
ai_assistedBlocker requires an AI remediation pass
human_policyBlocker requires a human decision

Remediation states

StateMeaning
idleNo remediation is active
scheduledRemediation is queued but not yet started
runningRemediation is executing
awaiting_reviewRemediation produced a proposal that needs human review
failedRemediation could not resolve the blocker
escalatedBlocker has been escalated for manual intervention
The recommendedSurface field tells you which page in the dashboard is most relevant for the current state:
ValueSurface
sourceSource detail page
runImprove-run detail page
proposalProposal detail page

Which endpoints include this field

  • Improve-run detailGET /api/improve-runs/:id (see Improve Runs)
  • Source detailGET /api/sources/:id (see Sources)
  • Proposal detailGET /api/proposals/:id/detail (see Proposals)