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

Server Action Passed As Argument Fails After Navigation Because Per-Page Decode Map Omits Retained Action

When a client stashes a server action from route /a and later calls an action from /b with that stashed action as an argument, Next.js decodes the outer action locally but uses a server module map limited to /b, so decoding the inner action reference fails with "Failed to find Server Action".

highConfidence 72%Next.jsHydrationRoute HandlersApp RouterAffected V16.3.0-Canary.102

Origin Analysis

Next.js builds per-page server reference module maps; decodeReply() for locally executed actions is given only the current page's map, so a retained action reference from another route cannot be revived even though its manifest entry exists.
pnpm install && pnpm dev; open /a, click 'Save action A'; navigate client-side to /b; click 'Run action B with saved action A'; observe 500 error with digest '370130379@E974'.

Fixing Code Block

Edge Case Audit

Using the first available worker for an action not reachable from the current page may run that action in a different worker context than its original page. If an action imports page-specific server modules or relies on route-local bundling, behavior could differ. This patch also increases the number of module references loaded for each local action decode. Rollback: remove the augmentation and instead statically import the retained action in the page that receives it as an argument.

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