> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myclaw.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Bot Status

> Reference for all bot lifecycle states.

Every bot in MyClaw has a status that reflects its current state in the Kubernetes lifecycle. The status is shown on the dashboard bot list and on each bot's detail page.

## Status reference

| Status      | Meaning                                                                                                                                                            |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `pending`   | Bot has been created in the database but its Kubernetes resources have not been scheduled yet.                                                                     |
| `deploying` | Kubernetes resources (StatefulSet, Service, Ingress, Secret) have been created and the pod is starting up. OpenClaw is initializing and connecting to the gateway. |
| `running`   | The bot is fully started and connected to the MyClaw gateway. It is actively responding to messages.                                                               |
| `stopped`   | The bot has been manually stopped. Kubernetes resources remain but the pod is scaled to zero replicas. Data is preserved.                                          |
| `failed`    | The bot crashed or failed to start. Check the Logs tab for details. You can attempt a restart via the Start button.                                                |
| `deleting`  | The bot deletion has been initiated. Kubernetes resources are being removed. The PVC (data volume) is retained for 30 days.                                        |

## Status transitions

```
pending → deploying → running
                    ↘ failed

running → stopped → running   (via Stop / Start)
running → deleting            (via Delete)
stopped → deleting            (via Delete)
failed  → deploying           (via Start)
```

## What happens during each transition

**pending → deploying**
MyClaw creates the Kubernetes Secret (encrypted config), StatefulSet, Service, and Ingress. The pod is scheduled on the cluster.

**deploying → running**
The OpenClaw container starts, completes its 5-step gateway handshake with MyClaw, and begins accepting messages. MyClaw's StatusController watches the pod via the Kubernetes Watch API and updates the DB status on success.

**running → stopped**
MyClaw scales the StatefulSet replicas to 0. The pod is terminated gracefully. All config and conversation data on the PVC is preserved.

**any → failed**
The pod exited with a non-zero code or was killed by the liveness probe. Check **Logs** on the bot detail page to diagnose.

**any → deleting**
MyClaw removes the StatefulSet, Service, Ingress, and Secret immediately. The PVC is flagged for deletion after 30 days and cleaned up by a background job.

## Troubleshooting failed bots

1. Click the bot to open its detail page.
2. Click the **Logs** tab to see the last container output.
3. Common causes:
   * Invalid API key — check the key is correct and has not expired
   * Model name typo — verify the exact model identifier for your provider
   * Provider outage — try again in a few minutes
4. Fix the config on the **Config** tab if needed, save, then click **Start**.
