> ## 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.

# How verification works

> The completion gate, verification cycles, verdicts and retries: what happens when your agent finishes a task.

IronBee's core idea is simple: **code isn't done until it's verified.** This page explains the mechanism behind that: how IronBee intercepts task completion, what the agent has to do to pass, and what happens when it doesn't.

The blocking gate is [enforce mode](#enforce-assist-and-monitoring-only). In the default assist mode, the same verification runs when you ask for it with `/ironbee-verify`, and nothing blocks completion.

***

## The completion gate

When you run `ironbee install`, IronBee registers a **completion hook** with your AI client (the `Stop` hook in Claude Code and Codex, the `stop` hook in Cursor). It fires when the agent tries to finish a task.

If the agent changed code files, the hook runs verification before letting the task complete:

```mermaid actions={false} theme={null}
flowchart TD
    A[Agent edits code] --> B[Agent tries to finish]
    B --> C{IronBee completion gate}
    C -->|all active cycles pass| D([Task completes])
    C -->|any cycle fails| E[Agent fixes the issues]
    E --> B
```

If no code files changed (docs, config, etc.), the gate doesn't trigger.

By default, IronBee counts a file as changed when the agent edits it with its file-editing tools. Edits made through shell commands, such as `sed -i` or a script, aren't seen unless you set `verification.changes.source` to `git`. See [How IronBee detects changes](https://docs.ironbee.ai/cli/guides/verification.md#how-ironbee-detects-changes).

***

## Verification cycles

A **cycle** is one pass of testing against a real surface. IronBee has six, and any combination can be active for a project:

| Cycle | Exercises the change through… |
| - | - |
| Browser | A real browser: navigation, screenshots, console, accessibility |
| Node | The Node.js V8 inspector: probes, runtime snapshots, and outbound HTTP capture |
| Python | A running Python process over debugpy/DAP: probes, thread dumps, and outbound HTTP capture |
| Backend | Real protocol calls: HTTP, gRPC, GraphQL, WebSocket |
| Android | An emulator over ADB: taps, swipes, screenshots, UI snapshots, Logcat, HTTP capture |
| Terminal | A pseudo-terminal (PTY): spawn the CLI, REPL or TUI, send input, capture output and exit codes |

When a task completes, **every active cycle whose patterns match the changed files must pass in the same verification attempt**. They run in parallel, not one task at a time. See [Verification](https://docs.ironbee.ai/cli/guides/verification.md) for choosing which cycles are active.

***

## The verdict

To pass a cycle, the agent exercises the affected paths with that cycle's tools and submits a **verdict**, its assessment of whether the change works:

```json theme={null}
{
  "status":  "pass",
  "name":    "checkout total updates",
  "checks":  [ ... ],
  "issues":  [ ... ],
  "fixes":   [ ... ],
  "summary": "**What was verified**\n- ...\n\n**What was found**\n- ...\n\n**Verdict** ..."
}
```

IronBee doesn't take `status: "pass"` at face value. Each cycle defines the tools that must appear on the wire before a pass counts: required tools (all-of) and alternative evidence paths (any-of). If the agent submits a pass without having used those tools, the gate rejects it and sends the agent back to verify. This is what stops an agent from declaring "it works" without testing.

A **pass** can still list `issues`. They are advisory: the change counts as verified, and the issues are reported for you to consider, not as something the agent must fix. Only a **fail** verdict's issues have to be fixed.

`name` is an optional short label (3–6 words) for what the cycle actually verified. It isn't part of the verdict itself: IronBee lifts it off the payload and stamps it on the cycle as it closes. See [What a cycle records](#what-a-cycle-records) below.

`summary` is optional, and recommended on every verdict: a Markdown text for a reader who sees nothing else. The console shows it as the verification's [**Summary**](https://docs.ironbee.ai/console/verification-detail.md#the-result). IronBee asks the verifier to write it the way IronBee's own verifications do: a bold **What was verified** label with one bullet per thing it exercised, a bold **What was found** label with one bullet per finding, then a bold **Verdict** with one sentence. It uses no headings. It asks for each `checks` and `issues` entry in the same style: a short bold title, a sentence or two, then `Where:`, `Proof:` and `Impact:` lines when they apply. The style is asked for, never checked. A summary that isn't a string, or is longer than 10,000 characters, is rejected.

***

## What a cycle records

Beyond the verdict, every verification cycle carries three pieces of metadata so the Console can describe a run at a glance:

| | Where it comes from | Trusted because |
| - | - | - |
| **Name** | The agent names the cycle when it opens (`ironbee hook verification-start --name`) and may rename it on the verdict's optional `name` field. The closing name wins - the agent knows more once it's done. A [saved-scenario](https://docs.ironbee.ai/cli/guides/scenarios.md) run is named after its scenario automatically. | Display only. It never gates anything, so a bad label costs nothing but clarity. |
| **Platforms** | Which cycles were *enabled* when the cycle opened, and which ones it *actually exercised* by the time it closed. | The exercised set is derived **mechanically** from the cycle's own recorded tool calls, never from what the agent claims. A cycle that drove no platform tools records none. |
| **Reason** | A one-sentence "why this call". IronBee's [delegated sub-agents](#who-drives-the-tools) attach one to every verification tool call; on Claude Code a `Bash` call without one falls back to the model's own command `description`. Where the main agent drives the tools directly (Cursor, Codex `main-agent`) none is requested. | Display only - it annotates the timeline, it never changes what a tool does or whether a cycle passes. |

> [!WARNING]
>
> The per-call **reason** is model-authored free text that ships to the Collector alongside the tool call. IronBee instructs the agent to keep it to one sentence and to put no secrets, tokens, or personal data in it - but it is not redacted by [privacy mode](https://docs.ironbee.ai/cli/advanced/privacy.md), which gates DevTools payloads rather than this field, and there's no separate switch for it. See [Privacy mode → Tool-call reasons](https://docs.ironbee.ai/cli/advanced/privacy.md#tool-call-reasons).

***

## Retries

A failed verdict sends the agent back to fix the issues and verify again. Two counters bound this loop, both capped by [`maxRetries`](https://docs.ironbee.ai/cli/configuration/configuration#core-options) (default **3**):

* **The gate's retry count**, across all active cycles.
* **The fail streak**: consecutive failed verdicts for the current change. Each failed verdict's reply shows it, for example `fail (2/3 for this change)`. The streak resets on a pass, on a not-applicable verdict, and whenever the gate lets the task complete.

When the fail streak reaches the cap, the verdict's reply reads `RETRY LIMIT REACHED`, and the agent stops re-verifying. When the gate's retry count reaches it, the gate lets the task complete with a message such as `VERIFICATION FAILED 3 TIMES. Allowing completion.` Either way, the agent may complete the task **but must report the unresolved issues** rather than silently pass. The streak also bounds delegated verification loops and manual `/ironbee-verify fix` runs, in every mode.

***

## Who drives the tools

On **Claude Code** and **Codex**, the main agent **delegates verification to a dedicated `ironbee-verifier` sub-agent** that owns the devtools tools. This keeps the heavy devtools output (DOM, console, screenshots) out of the main conversation while still recording everything to the same session. On Codex, the devtools server is also registered for the whole session, because Codex 0.154 and later ignore the MCP servers in an agent file, so the main agent can see its tools. IronBee's rule keeps the main agent delegating, and in enforce mode its pre-tool hook refuses a devtools call made outside a verification cycle. **Cursor** has no sub-agent surface, so its main agent verifies directly. See [Verification → How verification runs](https://docs.ironbee.ai/cli/guides/verification.md#how-verification-runs-the-verifier-sub-agent).

Every agent-bound event the session ships - tool calls, file changes, verification start/end, verdicts, check results - carries an **`agent_name`** (`main` for the top-level conversation, or the sub-agent's name like `ironbee-verifier`), so the Console can show exactly *who* did what within one session. Each agent's runtime state is likewise kept in its own partition on disk (see [Runtime files → Per-agent state](https://docs.ironbee.ai/cli/advanced/runtime-files.md#per-agent-state-agentsagentid)), so a delegated verifier and the main agent never race on the same files.

***

## Default vs custom scenarios

By default the gate verifies only the areas affected by what changed. You (or the agent) can instead pass a **custom scenario** to [`/ironbee-verify`](https://docs.ironbee.ai/cli/clients/claude-code#slash-commands) - inline text or a path to a scenario file - to specify exactly which flows, states, and endpoints to exercise. See [Custom verification scenarios](https://docs.ironbee.ai/cli/guides/verification.md#custom-verification-scenarios).

***

## Enforce, assist, and monitoring-only

The blocking gate described above is **enforce mode**. It's one of three [verification modes](https://docs.ironbee.ai/cli/guides/verification.md#verification-modes), and it's **opt-in** - a fresh install defaults to **assist**:

* **Assist** *(default)* (`ironbee verification auto disable`) - the `/ironbee-verify` command, the verifier sub-agent, and the devtools MCP server stay installed so the agent verifies when you ask, but no gate ever blocks completion. Every manual cycle is still recorded to the Collector. Turn on full enforcement with `ironbee verification auto enable`.
* **Monitoring-only** (`ironbee verification disable`) - none of the machinery is installed. The agent works unblocked, but session lifecycle, tool calls, and timing still flow to the Collector. Useful for measuring baseline behavior before turning verification on.

***

## Area-specific guidance

Teams can steer *how* the agent verifies a given part of the codebase by committing [`.ironbee/VERIFICATION.md`](https://docs.ironbee.ai/cli/guides/verification-context) files. When a change touches that area, IronBee injects the matching guidance into the agent's context as it starts verifying: advisory instructions layered on top of the standard flow, resolved hierarchically from the changed paths.

***

## Session isolation

Every agent task runs as its own **session**, tracked independently in a per-session `sessions/<id>/` directory (by default under `~/.ironbee/projects/<token>/`, outside the project tree - see [Runtime files](https://docs.ironbee.ai/cli/advanced/runtime-files.md#where-per-session-data-lives)). Concurrent sessions, even in the same project, keep separate event logs, verdicts, and retry counters, so they never interfere. See [Runtime files](https://docs.ironbee.ai/cli/advanced/runtime-files.md) for what's stored per session.

***

## Where sessions go

Every session reports to a project in the [IronBee Console](https://console.ironbee.ai), where its verification cycles appear on the project's [Verifications](https://docs.ironbee.ai/console/verifications.md) tab. The project is chosen from your repository. See [How IronBee identifies your project](https://docs.ironbee.ai/cli/concepts/projects.md).

***

## What's next?

> [card] [Manage projects](https://docs.ironbee.ai/cli/guides/managing-projects.md)
>
> Install, remove, track, and update IronBee across your projects.

> [card] [Verification](https://docs.ironbee.ai/cli/guides/verification.md)
>
> Choose which cycles run and how enforcement behaves.


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