AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Strict Route Matching Drops Pages In Sibling Route Groups When A Parallel Slot Catch-All Is Present

Next.js 16.4+ strict route matching incorrectly treats a parallel slot catch-all from one route group as part of routes in sibling groups, causing valid pages to be reported as unmatched and failing dev/production webpack builds.

highConfidence 85%Next.jsTurbopackApp RouterRoute HandlersAffected V16.4.0Affected V16.5.0-Canary.2

Origin Analysis

normalizeCatchAllRoutes injects catch-all slot routes based only on the URL path, without checking whether the slot belongs to the same route group as the page being matched. Under strict route matching, the unrelated slot makes the route appear incomplete for the sibling group's layout, so the page is pruned as unmatched.
1. Create an app with the structure shown in the issue: app/(dashboard)/layout.tsx with {children}{modal}, app/(dashboard)/page.tsx, app/(dashboard)/tasks/page.tsx, app/(dashboard)/@modal/default.tsx, app/(dashboard)/@modal/[...catchAll]/page.tsx, and app/(settings)/settings/page.tsx. 2. Run `next dev`. 3. Visit `/settings`; observe 404 and terminal error about unmatched page. 4. Run `next build --webpack`; the build fails with UnmatchedAppPagesError.

Fixing Code Block

Edge Case Audit

This change could affect apps that rely on cross-group slot catch-alls (unusual but possible with ambiguous layouts). Apply only to versions after 16.4.0 where strict matching is active. Before deploying, test routes that use parallel routes with shared URL prefixes and ensure the slot still renders. If regressions appear, roll back to `deprecated.looseRouteMatching: true` or revert the patch. The filtering is done in the build-time route normalization, so no runtime performance impact; however, ensure the helper `getRouteGroup` correctly parses route groups from page paths (including nested groups).

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state