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

# Fix a bug from a Jam link

> Paste a Jam link and your coding agent fixes the bug. It reads the console errors, failed requests, and frames from the Jam.

Someone on your team records the checkout page failing and sends you `https://jam.dev/c/abc123`. Paste it to your coding agent and it starts from what happened, not from a guess. Nobody writes a repro or scrubs a video.

<Info>
  Install the CLI and run `jam skills install` first. See [Get started](/docs/cli#quickstart).
</Info>

## Ask your agent

```text wrap theme={"theme":"css-variables"}
Fix this: https://jam.dev/c/abc123
```

The `jam-cli` skill tells the agent which reads to run and in what order. The steps below show the commands it runs, so you can run them yourself too.

## What the agent runs

<Steps>
  <Step title="Read the errors and failed requests">
    ```bash theme={"theme":"css-variables"}
    jam get jam abc123
    jam get network abc123 --status 5xx
    jam get console abc123 --level error
    ```

    The network read returns one line: `POST /api/checkout` answered 500 at 42 seconds. The console read returns the `TypeError` the page threw a moment later. Add `--json` to get the response body and the stack trace.
  </Step>

  <Step title="Look at the screen when the logs run out">
    ```bash theme={"theme":"css-variables"}
    jam get frames abc123 --at 42000
    ```

    This writes a JPG of the page at 42 seconds: the card field filled, the button grayed out. Logs say what broke. Frames say what the person saw.
  </Step>

  <Step title="Fix the code">
    With the endpoint, the payload, and the stack trace, the agent finds the handler and patches it.
  </Step>

  <Step title="Comment the fix on the Jam">
    ```bash theme={"theme":"css-variables"}
    jam create comment abc123 "500 on /api/checkout: totals missing when a coupon is applied. Fix in #1423." --at 42000
    ```

    `--at` pins the comment to the moment of failure. The reporter sees it on the Sharepage.
  </Step>
</Steps>

## Next

* To show that the fix works, follow [Prove a fix with a video](/docs/cli-proof-video) or [Prove a fix with a screenshot](/docs/cli-proof-screenshot).
* For every filter on `jam get` and every frame option, see [Read Jam data](/docs/cli-reference#read-jam-data).


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