# `useSearchParams() should be wrapped in a suspense boundary at page "/…".`

**Where it appears:** Vercel build logs or `npm run build`

**What it means:** A client component reads URL query parameters with `useSearchParams()`, and Next.js needs a `<Suspense>` wrapper around it so the rest of the page can load immediately.

## Likely causes

- Using `useSearchParams()` in a client component without wrapping that component in `<Suspense fallback={...}>` in its parent page.
- Testing only with `npm run dev` (which doesn't pre-build pages) instead of running `npm run build` before pushing.

## Message for your agent

```text
The build failed with `useSearchParams() should be wrapped in a suspense boundary`. Wrap the component that calls `useSearchParams()` in `<Suspense>` and verify with `npm run build`.
```

**Prevention:** Run `npm run build` locally before opening a pull request to catch static build checks early.

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/errors/usesearchparams-should-be-wrapped-in-suspense) · License: CC BY 4.0
