---
title: "Reap agent cloud instances abandoned in a non-terminal status"
method: GET
path: "/cron/agentSession/reapStuckInstances"
tags: ["AgentSession"]
---

# Reap agent cloud instances abandoned in a non-terminal status

`GET /cron/agentSession/reapStuckInstances`

Cron endpoint that finalizes agent cloud instances left in a non-terminal status (queued or running) past their deadline by a pod that crashed or was lost without writing a terminal status. Terminates never-started (queued) instances, fails abandoned (running) instances, and releases the rate-limit quota slot each held. Authorization handled by CloudSchedulerAuthorizationFilter in web.xml.

## Response `200`

Reaping process completed

- StuckInstanceReapResult — Result of the stuck agent cloud instance reaping cron job
  - `queued_terminated_count` integer, required — Number of queued instances transitioned to terminated
  - `running_failed_count` integer, required — Number of running instances transitioned to failed

## Other responses

- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
