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

Stalled RSC Request Permanently Kills Soft Navigation With StaleTimes.Dynamic > 0

A never-settling RSC fetch promise stored in the segment cache during a stalled navigation poisons subsequent navigations to the same route. With staleTimes.dynamic > 0, the poisoned entry suppresses all requests for the stale window, and even after recovery the navigation remains dead due to React staying suspended on the stale thenable. Requires full page reload.

highConfidence 85%Next.jsRoute HandlersApp RouterAffected V16.3.3

Origin Analysis

The segment cache stores an unsettled promise from a stalled RSC request in the BFCache. When staleTimes.dynamic > 0, the cache serves this poisoned entry with needsDynamicRequest=false, suppressing network requests. Later, React suspends on the never-resolving prefetchRsc promise and the navigation error is silently swallowed by navigateToUnknownRoute().catch(() => state), so the route becomes permanently dead until a full reload.
1. npm install && npm run build && npm start with config experimental.staleTimes={dynamic:60, static:300}. 2. Open localhost:3000 and click 'Run reproduction'. The harness shims fetch to hang RSC requests for /target, clicks the link to poison the cache, restores fetch, then repeatedly clicks and logs URL changes and request counts. 3. Observe that post-restore clicks are dead: URL unchanged, zero requests until staleAt expires, then one request but still dead. Compare with dynamic unset: requests are issued but navigation still fails. Control link /other works normally.

Fixing Code Block

Edge Case Audit

This fix may change cache behavior by delaying or skipping caching of in-flight entries, potentially increasing server requests. The promise settlement detection must be race-free; concurrent navigations to the same route could lead to multiple cached entries if not synchronized. The full navigation fallback should be limited to avoid redirect loops and must respect client-side routing preferences. Rollback is safe by reverting both changes, but testing under slow network and concurrent navigation scenarios is advised.

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