{"record":{"id":"4c83cb3a8cee784f","repo":"coleam00/Archon","slug":"node-node-id-could-not-resume-the-exact-sessi","errorCode":null,"errorMessage":"Node '${node.id}' could not resume the exact session from '${namedResumeSourceNodeId}'. The provider reported that prior context was not restored.","messagePattern":"Node '(.+?)' could not resume the exact session from '(.+?)'\\. The provider reported that prior context was not restored\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workflows/src/dag-executor.ts","lineNumber":3132,"sourceCode":"    if (creditError) {\n      const duration = Date.now() - nodeStartTime;\n      getLog().warn({ nodeId: node.id, durationMs: duration }, 'dag.node_credit_exhausted');\n      return await failAgentNode(creditError, { output: nodeOutputText });\n    }\n\n    // Fail for zero output: covers both silent non-timeout exits AND idle-timeout before first token (time-to-first-token exceeded the window).\n    if (nodeOutputText.trim() === '' && structuredOutput === undefined) {\n      const duration = Date.now() - nodeStartTime;\n      const emptyError = nodeIdleTimedOut\n        ? `Node '${node.id}' timed out with no output (idle for ${String(effectiveIdleTimeout / 60000)} min). The provider did not emit any content before the watchdog fired — likely time-to-first-token exceeded the timeout. Consider increasing idle_timeout or reducing prompt size.`\n        : `Node '${node.id}' produced no assistant output. The provider stream closed without yielding content — likely a silent provider rejection or stream interruption.`;\n      getLog().error({ nodeId: node.id, durationMs: duration }, 'dag.node_empty_output');\n      return await failAgentNode(emptyError);\n    }\n\n    if (namedResumeSourceNodeId !== undefined) {\n      if (nodeResumed !== true) {\n        throw new Error(\n          `Node '${node.id}' could not resume the exact session from '${namedResumeSourceNodeId}'. The provider reported that prior context was not restored.`\n        );\n      }\n      if (newSessionId === undefined || newSessionId.trim() === '') {\n        throw new Error(\n          `Node '${node.id}' forked the session from '${namedResumeSourceNodeId}' but the provider returned no branch session ID.`\n        );\n      }\n      if (newSessionId === resumeSessionId) {\n        throw new Error(\n          `Node '${node.id}' did not create an immutable fork of '${namedResumeSourceNodeId}': the provider reused the source session ID.`\n        );\n      }\n    }\n\n    if (newSessionId !== undefined) {\n      await checkpointSession?.(newSessionId);\n    }","sourceCodeStart":3114,"sourceCodeEnd":3150,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/dag-executor.ts#L3114-L3150","documentation":"When a node names a resume source (namedResumeSourceNodeId) to continue an exact prior session, the executor verifies that the provider actually reported the session as resumed (nodeResumed === true). If the provider says prior context was not restored, it throws — a forked/partial resume would silently lose conversation context, so this fails loudly.","triggerScenarios":"Node configured with a session/resume source from another node; the provider SDK resumed but reported the prior context was not restored (e.g. session file missing/corrupt, provider could not load that session id).","commonSituations":"Resuming a session produced by a different provider or an incompatible version; the source node's session store was cleaned up or on a different volume; provider-specific session format changed after an upgrade.","solutions":["Verify the resume source node actually ran and produced a session in this run.","Check that the source session's provider matches this node's provider (session formats are provider-specific).","Run without the named resume source to start a fresh session if continuity is not required.","Check for provider upgrades/version mismatches that invalidate old session storage."],"exampleFix":"// before\nnode:\n  id: fix\n  resume_from: plan\n# after — either ensure plan ran with the same provider, or\nnode:\n  id: fix\n  # fresh session, no resume_from","handlingStrategy":"validation","validationCode":"// before running, confirm the resume source exists, ran, and used the same provider\nconst src = runOutputs[namedResumeSourceNodeId];\nif (!src?.sessionId) throw new Error(`Resume source '${namedResumeSourceNodeId}' produced no session`);\nif (src.provider !== node.provider) throw new Error('Resume source provider mismatch');","typeGuard":"function hasResumableSession(o: unknown): o is { sessionId: string; provider: string } {\n  return typeof o === 'object' && o !== null && typeof (o as any).sessionId === 'string' && (o as any).sessionId.length > 0;\n}","tryCatchPattern":"try {\n  await runNode(node);\n} catch (e) {\n  if (String(e).includes('could not resume the exact session')) console.error('Falling back to fresh session for', node.id);\n  else throw e;\n}","preventionTips":["Only resume sessions from nodes using the same provider.","Verify session storage is persistent and not cleaned between runs.","Test resume paths after provider version upgrades."],"tags":["session","resume","provider"],"backgroundTag":"session-resume-failed","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}