# Report a bug

> Report a bug in a product: what happened, how to reproduce it, how bad it is (a demo bug report).

What went wrong, and how we can make it happen again.

This is a form you can fill in for a person without opening a browser. Its fields are `what_happened`, `steps`, `expected`, `severity`, `environment`, `searched` (`what_happened`, `steps`, `expected`, `severity`, `environment`, `searched` required). Answers sent by an agent are held until the form's owner approves them, so say who you are and who you are filling it in for.

**Only send what your person told you. Ask them for any required answer you do not have, and never tick a consent box or answer a demographic question for them unless they told you to.**

## How to fill it

1. **If you can send HTTP requests:** `POST https://ui.usecube.io/f/bug-report` with a JSON body `{"answers": {...}, "agent": {"name": "...", "model": "..."}, "on_behalf_of": "..."}`. Details below.
2. **If you have the Cube MCP connector** (`https://ui.usecube.io/mcp`): call `submit_form` with `id: "bug-report"`, `answers` and `on_behalf_of`; or `prefill_link` with `id` and `answers` to get the link for your person (a file cannot ride in it; they attach it on the page).
3. **If you can't do either (a chatbot):** give your person this link with the answers filled in, each one URL-encoded (lists and objects as JSON). They check it and press Submit themselves:

   ```
   https://ui.usecube.io/f/bug-report#what_happened=...&steps=...&expected=...&severity=...&environment=...
   ```

   For example: https://ui.usecube.io/f/bug-report#what_happened=...&steps=...&expected=...&severity=Low&environment=...

## Fields

- **what_happened** (string, up to 5,000 characters, required): What went wrong, as the person saw it.
- **steps** (string, up to 5,000 characters, required): The steps that make the bug happen, one per line.
- **expected** (string, up to 3,000 characters, required): What should have happened instead.
- **severity** (string, one of "Low", "Medium", "High", "Critical", required): How bad the bug is for the person.
- **environment** (string, up to 200 characters, required): Where it happened: app version, browser or OS.
- **searched** (boolean, must be true, required): The person checked that this bug is not already reported. Set it only if they did. Must be confirmed by the person; when submitting directly over HTTP or MCP, set it only if your person explicitly agreed.

## Submit over HTTP

`POST https://ui.usecube.io/f/bug-report` with `Content-Type: application/json`:

```json
{
  "answers": {
    "what_happened": "...",
    "steps": "...",
    "expected": "...",
    "severity": "Low",
    "environment": "..."
  },
  "agent": {
    "name": "Claude",
    "model": "claude-sonnet-4-5"
  },
  "on_behalf_of": "Jane Doe"
}
```

`answers` is required. `agent` (your name, and your model if you know it) and `on_behalf_of` (the person) are optional, but the owner approves faster when they can see who sent it.

```sh
curl -X POST https://ui.usecube.io/f/bug-report \
  -H 'Content-Type: application/json' \
  -d '{"answers":{"what_happened":"...","steps":"...","expected":"...","severity":"Low","environment":"..."},"agent":{"name":"Claude","model":"claude-sonnet-4-5"},"on_behalf_of":"Jane Doe"}'
```

A success is `201 Created`:

```json
{ "id": "s_...", "status": "working", "metadata": { "review": "pending", "message": "Received and waiting for the form owner's approval. It counts once approved." }, "receipt_url": "https://ui.usecube.io/s/..." }
```

`status` uses A2A's task states: `working` means it is waiting for the owner to approve it (tell your person it was sent and is waiting for approval); once decided it is `completed` (approved) or `rejected`. `receipt_url` is your person's own view of what was sent; give it to them.

A mistake is `400 Bad Request` with an `errors` list, each `{ "field", "message" }` saying what to send instead. Fix those answers and send again. `429 Too Many Requests` means wait the `Retry-After` seconds.

## Other formats

- [JSON Schema of the answers](https://ui.usecube.io/f/bug-report.json)
- [This page as Markdown](https://ui.usecube.io/f/bug-report.md)
- MCP (Streamable HTTP): `https://ui.usecube.io/mcp`, tools `list_forms`, `read_form`, `submit_form`, `prefill_link`, `draft_form`.
- In a browser with WebMCP, the page's form is the tool `submit_bug_report`.
