# Blocks, CAPTCHAs and hand-offs

> What happens when a site pushes back: CAPTCHAs, sites that refuse servers, and pausing for you.

Source: https://usewrit.app/docs/bot-walls/

Some sites push back on automated visits: a CAPTCHA, a bot wall, a refused connection, a sign-in page
or a request for a code. Writ gets past what it can by itself, tells you the price when that costs
credits, and pauses for you when only a person can go on.

## What Writ handles by itself

| The site shows | What Writ does | Cost |
| --- | --- | --- |
| A check that clears in a browser, such as a checkbox or a waiting page | Passes it in the browser. | Free |
| A CAPTCHA that needs solving | A paid solver passes it. Pro and up | +10 credits per CAPTCHA passed |
| A refusal of Writ's servers | Reads the site through a residential connection, when your plan can pay for it. | 7 credits per MB |
| A sign-in page, because the session expired | Signs in again with the persona. | Normal run cost |
| A two-factor code | Gets the code from the persona's 2FA setup. Pro and up in Writ Cloud | Included |

A CAPTCHA is charged only when a paid solver passes it. A failed solve costs nothing, and neither does a
wall Writ passes by itself. On plans below Pro, a CAPTCHA or a code that Writ cannot handle becomes a [hand-off](https://usewrit.app/docs/bot-walls#when-a-run-needs-you): the run pauses and asks you.

> **limit:** No tool gets past every wall. Some sites refuse automated visits whatever the plan or the connection. For those, Writ stops and says which site refused and how.

## When a site refuses Writ's servers

Writ Cloud reads sites from Writ's servers, which sit at data-center addresses. Some sites refuse every
data-center address, or show a bot check to it, so the page never loads. A residential connection, an
address like the one you have at home, gets past most of these refusals.

When your plan cannot pay for a residential connection, Writ shows a card titled **What gets past it**, which names the site and why it refused. It offers, in this order:

- **Upgrade to Starter** or **Upgrade to Pro**: the cheapest plan that gets past this site. This is the recommended choice. A site that refuses the address needs a residential connection, which Starter includes and pays from your monthly credits. A site that shows a security check also needs automatic CAPTCHA solving, which starts at Pro.
- **Do it from your computer with Writ Desktop**. It is free on every plan and uses your own connection. For a monitor, the button reads **Watch it from your computer with Writ Desktop**.
- **Buy credits**. Purchased credits pay for residential traffic as you go, at 7 credits per MB, on any plan.

When the question comes up in **Scribe** before anything runs, it also offers **Try from Writ's servers anyway** and **Stop here**.

> **cost:** Residential traffic costs 7 credits per MB, about 7,000 per GB. A run or a harvest that switches to it says so, and the bandwidth appears in your usage.

## When a run needs you

Some steps need a person: a CAPTCHA your plan does not solve, a code that only reaches your phone, or a
sign-in nobody saved. The run pauses on its live browser and asks you, instead of failing. This is a hand-off.

Runs that you own pause this way: runs you start in the app or from your AI assistant, schedules,
automations, monitor reactions and Scribe's runs. Calls from code never pause, because a program is
waiting for the reply: a call with an API key, a published endpoint or an incoming webhook fails at once
with the reason in the error. A harvest does not pause either: pages it cannot read are listed under
failed pages, with the likely cause.

-

1. **You get a notice**

A toast appears in the app: **A run needs you**, **A run needs you to sign in** or **A run needs a verification code**. On the **Runs** page, the paused run has a **Solve** button.

-

2. **You act in the live browser**

The panel shows the real page. Solve it in the live browser: click and type as you would on the site; your input goes straight to the page. For a code, click the code field on the page and type it there. Writ does not see or keep it.

-

3. **The run goes on**

Click **Done, continue**. If you took the browser over from your AI assistant, click **Hand back to the AI**. To stop instead, click **Cancel the job**.

Writ Desktop sends an operating system notification and shows a **Solve now** toast. A **Needs you** count stays in the top bar and in the tray menu until you answer. Each opens a full page with the live browser, where you solve the check and continue.

Writ Desktop never solves CAPTCHAs automatically; that is a Writ Cloud feature. A local run waits for
you for 15 minutes by default.

A hand-off waits 15 minutes in Writ Cloud. If nobody answers, the run ends with a timeout. When a
scheduled or background run is left unanswered, that workflow's background runs stop asking for 6
hours, so a blocked schedule does not notify you every few minutes. A run you start yourself always asks.

## What your AI assistant sees

When a site refuses Writ's servers, the tool answer carries a `site_block` object. It holds a `tell_user` sentence and the same options as the card, in the same order. Your assistant is
asked to pass the sentence on and let you choose.

When an open browser session meets something only you can do, your assistant calls `writ_browser_ask_user` with the kind of help it needs: a CAPTCHA, a two-factor code, a
sign-in or a question. The session pauses and you get the hand-off in the app. A code you enter there
goes to the site through Writ, so it never reaches the AI.

## For developers: errors you can get

A page read (`POST /api/crawl/scrape`, or `writ_scrape` from an assistant) that
ends on a bot wall answers `422` with the code `scrape_bot_wall`.
When a plan change, Writ Desktop or credits would get past it, the detail also holds `site_block`, and its `message` is the sentence to show your user.

```json
{
  "detail": {
    "code": "scrape_bot_wall",
    "message": "shop.example.com refuses connections from Writ's servers (a data-center address), so the page doesn't load. A residential connection gets past it, and the Starter plan includes one. Writ Desktop can also do it for free from your own computer, over your own connection, or credits pay for residential as you go (7 credits per MB).",
    "url": "https://shop.example.com/product/123",
    "vendor": "generic",
    "kind": "blocked",
    "site_block": {
      "code": "site_blocks_datacenter",
      "site": "shop.example.com",
      "wall": "refusal",
      "egress": "datacenter",
      "tell_user": "shop.example.com refuses connections from Writ's servers ...",
      "options": [
        { "id": "upgrade", "kind": "upgrade", "label": "Upgrade to Starter", "plan": "starter", "plan_name": "Starter" },
        { "id": "use_desktop", "kind": "desktop", "label": "Do it from your computer with Writ Desktop (free, uses your own connection)", "download_url": "https://usewrit.app/desktop" },
        { "id": "buy_credits", "kind": "credits", "label": "Buy credits (residential is 7 credits per MB)" }
      ],
      "recommended": "upgrade",
      "upgrade_plan": { "id": "starter", "name": "Starter" },
      "desktop": { "download_url": "https://usewrit.app/desktop", "free": true, "linked": false }
    }
  }
}
```

`options[].id` is `upgrade`, `use_desktop`, `buy_credits`,
or `try_anyway` where trying is still possible. `wall` is `refusal` when the
site refuses the address and `check` when it shows a security check.

A call that would need automatic CAPTCHA solving or two-factor codes on a plan below Pro answers `402` instead, so your code can propose the upgrade:

```json
{
  "detail": "Automatic CAPTCHA solving is a premium feature. Your workflow is saved — upgrade to a premium plan to run it (CAPTCHA solving & automatic 2FA are included).",
  "code": "premium_feature_required",
  "current": null,
  "limit": null,
  "upgrade_hint": "pro"
}
```

Every error code is listed in [Errors](https://usewrit.app/docs/errors).

## Next

-
- [Sign-ins and secrets](https://usewrit.app/docs/personas): Personas, 2FA codes and what Writ keeps for you.
-
- [Writ Desktop](https://usewrit.app/docs/desktop): Run from your own computer and connection, free.
-
- [Credits and plans](https://usewrit.app/docs/billing-wallet): Which plan includes residential connections and CAPTCHA solving.
-
- [Errors](https://usewrit.app/docs/errors): Every error code and what to do about it.
