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

> ## Agent Instructions
> IronBee (ironbee.ai) is an AI QA engineer: it verifies code changes against the running app and keeps the evidence. It is not related to the IronBee open-source web application firewall.
> The console is at https://console.ironbee.ai.
> Install the CLI with `npm install -g @ironbee-ai/cli`, sign in with `ironbee login`, and set up a project with `ironbee install`.
> In GitHub workflows, use the action as `ironbee-ai/ironbee-action@v1` and pass the `IRONBEE_API_KEY` secret as the `ironbee_api_key` input.
> In GitLab pipelines, include the component `gitlab.com/ironbee-ai/ironbee-gitlab/verify@v1`; it reads the `IRONBEE_API_KEY` CI/CD variable by default.
> In Bitbucket Pipelines, run the pipe `docker://ghcr.io/ironbee-ai/ironbee-bitbucket:v1` and pass `IRONBEE_API_KEY: $IRONBEE_API_KEY` and `BITBUCKET_OAUTH_TOKEN: $BITBUCKET_OAUTH_TOKEN` under its `variables:`.
> Console scenarios (https://docs.ironbee.ai/console/scenarios) and CLI saved scenarios (https://docs.ironbee.ai/cli/guides/scenarios) are separate features.
> For plans and prices, link to https://ironbee.ai/pricing; the website is the source of truth for them.

# Job queue

> Inspect and manage the background queue that ships session data to the Collector.

IronBee buffers session events in a file-backed queue before sending them to the Collector. This happens automatically in the background and you rarely need to touch it. These commands are for diagnosing or recovering delivery when something stalls (e.g. you were offline and events piled up).

***

## Check queue status

Show queued job counts per session across the project:

```bash theme={null}
ironbee queue status
```

| Option | Description |
| - | - |
| `--session <id>` | Limit to one session |
| `--project-dir <dir>` | Target a specific project directory |

***

## Drain pending jobs

Process queued jobs synchronously, sending them to the Collector now instead of waiting for the background flush:

```bash theme={null}
ironbee queue drain
```

| Option | Description |
| - | - |
| `--session <id>` | Drain just one session |
| `--project-dir <dir>` | Target a specific project directory |

***

## Dead-letter queue

Jobs whose failures are **permanent** land in a **dead-letter** queue so they don't block healthy traffic. Transient failures (network errors, `429`, `5xx`) are retried on the next drain; anything else - an auth rejection (`401`/`403`, e.g. an expired credential) or any other `4xx` - is dead-lettered on the **first** attempt rather than retried pointlessly. Events dead-lettered under a bad credential won't auto-deliver later: fix the credential, then re-queue them with `dead-letter retry` (`dead-letter stats` shows the `auth:*` category). Inspect and recover them:

```bash theme={null}
ironbee queue dead-letter list                # list failed entries
ironbee queue dead-letter stats               # histogram of failure categories
ironbee queue dead-letter retry <job_id>      # re-queue one entry by its job id
ironbee queue dead-letter clear               # empty the dead-letter file
```

| Command | Notable options |
| - | - |
| `list` | `--session <id>`, `--limit <n>` (default 50) |
| `stats` | `--session <id>` |
| `retry <job_id>` | `--session <id>` to force re-queue into a specific session |
| `clear` | `--session <id>` to clear one session's entries; `--all` to also remove rotated `dead-letter-*.jsonl` archives |

Every `queue` subcommand also takes `--project-dir <dir>` to target a specific project directory.

***

## Purge

Destructive cleanup of queue state. Use with care:

```bash theme={null}
ironbee queue purge --snapshots                      # delete all snapshot files, unprocessed
ironbee queue purge --sessions older-than=14d        # remove queue dirs older than 14 days
```

| Option | Description |
| - | - |
| `--snapshots` | Delete all snapshot files across sessions **without** processing them |
| `--sessions <spec>` | Remove old `queue/` subdirs: `older-than=<duration>` (e.g. `older-than=14d`). Directories that still hold undelivered work or dead-letter records are skipped |
| `--project-dir <dir>` | Target a specific project directory |

> [!WARNING]
>
> `--snapshots` permanently discards events that were never sent. `--sessions` skips queue directories that still hold undelivered work. Reach for `drain` first if you want to deliver pending events rather than throw them away.

> [!NOTE]
>
> All of these commands are available interactively in the [TUI](https://docs.ironbee.ai/cli/guides/interactive-mode.md) Queue area.

***

## What's next?

> [card] [Runtime files](https://docs.ironbee.ai/cli/advanced/runtime-files.md)
>
> The `queue/` directory and everything else IronBee writes per session.

> [card] [Inspecting sessions](https://docs.ironbee.ai/cli/advanced/inspecting-sessions.md)
>
> Check verdict status and validate sessions from the terminal.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.