{"record":{"id":"40adf5ce078db4d4","repo":"can1357/oh-my-pi","slug":"memory-artifacts-are-not-available-for-this-projec","errorCode":null,"errorMessage":"Memory artifacts are not available for this project yet. Run a session with memories enabled first.","messagePattern":"Memory artifacts are not available for this project yet\\. Run a session with memories enabled first\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/internal-urls/memory-protocol.ts","lineNumber":340,"sourceCode":"\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Hindsight memories are not addressable via memory://. Recall results are final — use `recall` to search or `reflect` to synthesize. `read memory://<id>` is only available with memory.backend=mnemopi.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (mnemopiStates.length === 0) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Unknown memory namespace: ${namespace}. Supported: ${MEMORY_NAMESPACE} (file-backed memory summary), or a mnemopi memory id when memory.backend=mnemopi is active.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst hit = tryResolveMnemopiMemory(namespace);\n\t\t\tif (hit) return renderMnemopiMemory(url, hit);\n\t\t\tthrow new Error(\n\t\t\t\t`Mnemopi memory ${namespace} not found in any scoped bank. Use \\`recall\\` to list available ids.`,\n\t\t\t);\n\t\t}\n\n\t\tconst roots = memoryRootsForContext(context);\n\t\tif (roots.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t\"Memory artifacts are not available for this project yet. Run a session with memories enabled first.\",\n\t\t\t);\n\t\t}\n\n\t\tlet anyExists = false;\n\t\tfor (const root of roots) {\n\t\t\ttry {\n\t\t\t\tawait fs.stat(root);\n\t\t\t\tanyExists = true;\n\t\t\t} catch (error) {\n\t\t\t\tif (isEnoent(error)) continue;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tconst result = await tryResolveInRoot(url, root);\n\t\t\tif (result) return result;\n\t\t}\n\n\t\tif (!anyExists) {","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/internal-urls/memory-protocol.ts#L322-L358","documentation":"For the file-backed 'root' namespace, resolve gathers candidate memory roots (from the ResolveContext cwd or the live session registry). If none exist — no session context and no registered sessions, or no root directory on disk (anyExists stays false) — there are no memory artifacts to read, so it throws with this onboarding hint.","triggerScenarios":"Resolving memory://root/... when memoryRootsForContext(context) returns an empty list (no context.cwd and no registered sessions), or every candidate root path fails fs.stat with ENOENT.","commonSituations":"Querying memory:// in a brand-new project before any session with memories enabled has run; calling the protocol handler outside a session (SDK/embedding) without passing a ResolveContext; deleted or relocated .omp memory directory.","solutions":["Run a session in the project with memories enabled so memory artifacts are generated.","Pass a ResolveContext with the correct cwd when invoking resolve outside a live session.","Verify the memory root directory exists on disk for the project (restore it if deleted or re-run a session to recreate it)."],"exampleFix":"// before\nawait handler.resolve(parseInternalUrl(\"memory://root\")); // no context\n// after\nawait handler.resolve(parseInternalUrl(\"memory://root\"), { cwd: projectDir, settings });","handlingStrategy":"validation","validationCode":"const roots = context?.cwd\n  ? [getMemoryRoot(getAgentDir(), context.cwd)]\n  : memoryRootsFromRegistry();\nif (roots.length === 0 || !(await Bun.file(roots[0]).exists())) {\n  throw new Error(\"Run a session with memories enabled first\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await handler.resolve(url, ctx);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"Memory artifacts are not available\")) {\n    // bootstrap: run a memory-enabled session, then retry\n  } else throw err;\n}","preventionTips":["Run at least one memory-enabled session in the project before reading memory://root.","Pass a ResolveContext with cwd when invoking the handler outside a live session.","Confirm the memory root directory exists and was not deleted or relocated."],"tags":["memory-protocol","filesystem","initialization"],"backgroundTag":"memory-artifacts-not-initialized","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}