agent-triagelisted
Install: claude install-skill HermeticOrmus/ormus-agent-ops
# /agent-triage — Smart Failure Triage
> Failed tasks fall into a small number of buckets. Classify, then act.
## Prerequisites
| Var | Purpose |
|---|---|
| `AGENT_API_URL` | Base URL of the agent's HTTP API |
| `AGENT_API_TOKEN` | Bearer token |
Endpoints used:
- `GET /api/tasks?status=failed&since=<window>` — list failed tasks
- `GET /api/tasks/:id/log` — full log for one task
- `POST /api/tasks/:id/requeue` — requeue
- `POST /api/tasks/:id/dead-letter` — dead-letter
## Workflow
### Phase 1: Pull failures
```bash
curl -s -H "Authorization: Bearer $AGENT_API_TOKEN" \
"$AGENT_API_URL/api/tasks?status=failed&since=24h"
```
### Phase 2: Classify each failure
For each failed task, fetch its log/last error and assign one classification:
| Class | Pattern | Recommended action |
|---|---|---|
| `infra` | API rate limit, credit exhausted, network timeout, 5xx from upstream | **requeue** — not the task's fault |
| `auth` | 401/403 from upstream, expired token, missing credential | **fix-and-retry** — operator must rotate or refresh |
| `code` | Compile error, test failure, lint failure that the agent could fix | **requeue** with prompt amendment, or **dead-letter** if 3+ retries already |
| `prompt` | Agent looped, hit max iterations without converging, hallucinated nonexistent file | **fix-and-retry** — operator amends the prompt |
| `env` | Missing dep, wrong Node version, path doesn't exist on worker | **fix-and-retry** — operator fixes the env |
| `wontfix` | Task is