---
title: "spinrun agent test"
description: "`spinrun agent test <ref> [--prompt p]` — Run it once and wait for the result."
url: https://docs.spinrun.ai/cli/agent-test
markdown_url: https://docs.spinrun.ai/cli/agent-test.md
---

# spinrun agent test

{/* GENERATED from @spinrun/cli/commands.ts — do not edit by hand. */}

Run it once and wait for the result.

Usage: `spinrun agent test <ref> [--prompt p]`

```bash
spinrun agent test triage-bot --prompt "Triage the last three issues"
```

Prints the run id at once, then polls every two seconds. On `finished` it prints the final text and the credits spent and exits 0; on `failed`, `aborted` or `waiting_approval` it prints the status, the error and the run id and exits 2. After five minutes it prints the run id and exits 1 — the run keeps going, and keeps spending credits, on the server.

## Related [#related]

* [CLI](https://docs.spinrun.ai/cli.md)
* [Build](https://docs.spinrun.ai/build.md)
