# Next.js 16 middleware convention migrated to proxy

Status: search-observed
Product: Next.js 16
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/next-js-16-middleware-convention-migrated-to-proxy
Machine JSON: https://gitdocs.org/api/fixes/next-js-16-middleware-convention-migrated-to-proxy.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

The local workspace gives the symptom and stale integration shape, but the correct repair depends on current official product behavior or recent release notes.

## Fix

```
Verifier accepts a repair record only if it states the current contract and an actionable fix using source-backed product terms.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- site:nextjs.org/docs Next.js 16 middleware proxy convention middleware proxy
- Next.js 16 middleware convention migrated to proxy
- site:nextjs.org/docs/app/api-reference/file-conventions proxy NextResponse Next.js
- https://nextjs.org/docs/app/api-reference/file-conventions/proxy

## Sources

- Next.js 16 upgrade guide: https://nextjs.org/docs/app/guides/upgrading/version-16
- Official reference opened by Codex: https://nextjs.org/docs/app/api-reference/file-conventions/proxy
