# First run

> How to run a first test from your coding agent or the CLI, read the report, and get it fixed.

Source: https://docs.screwbugs.dev/get-started/first-run

Ask your agent in plain words.

**Your agent:**

Pick one and paste it:

```text
Start this project's dev server if it isn't running, then use screw-bugs to check that sign-up works.
```

```text
Use screw-bugs to check what I just changed on the pricing page.
```

```text
Use screw-bugs to test checkout on a phone-sized screen.
```

What happens:

1. **Your agent plans** the tests.
2. **screw-bugs clicks through them** in a real browser and records it.
3. **Your agent tells you** what worked and what broke, with a link to the report.

**CLI:**

Check that a page loads:

```sh
npx -y screw-bugs@latest run --url http://localhost:3000
```

Run your own cases from a job file ([format](/screw-bugs/cases-and-steps.md)):

```sh
npx -y screw-bugs@latest run --spec job.json
```

`run` waits for the run, prints the report's URL, and exits with code 1 unless every case passed.

## Open the report

Click the link your agent gives you. The verdict is at the top, then each issue with its screenshot.

![A report: the title, 1 of 4 cases passed, the verdict, and the first issue.](https://docs.screwbugs.dev/screenshots/example-report-verdict.webp)

## Get it fixed

The agent that ran the tests already knows the issues. Ask it:

```text
Fix the issues screw-bugs found, then run the same tests again.
```

Got a report link from someone else (a PR comment, a teammate)? Paste it into your agent:

```text
Fix the issues in this screw-bugs report, then use screw-bugs to run the same tests again: 
```

Then paste the link after it. Fixing works without screw-bugs; running the tests again needs it ([Install](/get-started/install.md)).

### Where the files are

- Each run is a folder in your project: `.screw-bugs/runs/<job-id>/`, with `report.html` inside.
- Use the link, not the file: only the link has the **Share** button.
- With Tailscale running, the link also opens on your other devices.

## For agents

1. `start_run` with `url`, `summary` and `cases` ([job format](/screw-bugs/cases-and-steps.md), [all arguments](/screw-bugs/mcp-and-cli.md)). It returns a job ID at once.
2. `run_status` with the `jobId` and `waitSeconds: 60`, again until the run has ended.
3. Read the evidence, then `submit_findings` with your write-up, so the report shows it (format: `npx -y screw-bugs@latest schema findings`).
4. Give the user the report's `http://` link and your summary.

**Next:** [Share a report](/get-started/share-a-report.md)