{"record":{"id":"6e8ee1beca6d5355","repo":"can1357/oh-my-pi","slug":"unknown-memory-namespace-namespace-supported-6e8ee1","errorCode":null,"errorMessage":"Unknown memory namespace: ${namespace}. Supported: ${MEMORY_NAMESPACE} (file-backed memory summary), or a mnemopi memory id when memory.backend=mnemopi is active.","messagePattern":"Unknown memory namespace: (.+?)\\. Supported: (.+?) \\(file-backed memory summary\\), or a mnemopi memory id when memory\\.backend=mnemopi is active\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/internal-urls/memory-protocol.ts","lineNumber":327,"sourceCode":"\t\t\tconst hindsightActive =\n\t\t\t\tbackend === \"hindsight\" ||\n\t\t\t\t(mnemopiStates.length === 0 &&\n\t\t\t\t\tAgentRegistry.global()\n\t\t\t\t\t\t.list()\n\t\t\t\t\t\t.some(ref => ref.session?.getHindsightSessionState?.()));\n\t\t\tif (hindsightActive) {\n\t\t\t\t// Hindsight keeps memories server-side and exposes no\n\t\t\t\t// `memory://<id>` addressing, yet the shared `recall` tool\n\t\t\t\t// description still steers a follow-up `read memory://<id>`.\n\t\t\t\t// Return a corrective pointer so that stray read self-corrects in\n\t\t\t\t// one turn instead of derailing on the generic namespace error\n\t\t\t\t// (issue #7587).\n\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;","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/internal-urls/memory-protocol.ts#L309-L345","documentation":"With a non-'root' namespace, no Hindsight session, and no live mnemopi session state in the registry, there is no mechanism to interpret the host as a memory id. The handler rejects it, explaining that 'root' is the only file-backed namespace and memory ids only work when memory.backend=mnemopi is active.","triggerScenarios":"Resolving memory://<non-root-host> when mnemopiSessionStatesFromRegistry() returns empty (no session initialized with the mnemopi backend) and hindsight is not active — e.g. backend unset/'file' while a memory id is used as the host.","commonSituations":"Reading memory://<id> in a fresh session before any mnemopi-backed session has initialized its banks; backend switched away from mnemopi while old prompts still reference ids; typo'd hostnames like memory://Root.","solutions":["Use memory://root to read the file-backed memory summary.","Start/enable a session with memory.backend=mnemopi before reading memory://<id>.","Verify the id spelling and that it comes from a `recall` in the current mnemopi-backed session."],"exampleFix":"// before\nread(\"memory://mem_abc123\") // no mnemopi backend active\n// after\nread(\"memory://root\") // or enable memory.backend=mnemopi first","handlingStrategy":"validation","validationCode":"const ns = url.rawHost || url.hostname;\nif (ns !== \"root\" && !/^[a-z0-9-]+$/i.test(ns)) throw new Error(`Unsupported memory namespace: ${ns}`);","typeGuard":null,"tryCatchPattern":"try {\n  return await handler.resolve(url, ctx);\n} catch (err) {\n  if (err instanceof Error && err.message.startsWith(\"Unknown memory namespace\")) {\n    // fall back to memory://root or instruct user to enable mnemopi\n  } else throw err;\n}","preventionTips":["Only use memory://<id> when memory.backend=mnemopi is active in a live session.","Default to memory://root for file-backed reads.","Verify backend state before issuing id-based reads in fresh sessions."],"tags":["memory-protocol","namespace","session-state"],"backgroundTag":"unknown-url-namespace","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}