can1357/oh-my-pi · error

Unknown memory namespace: ${namespace}. Supported: ${MEMORY_

Error message

Unknown memory namespace: ${namespace}. Supported: ${MEMORY_NAMESPACE} (file-backed memory summary), or a mnemopi memory id when memory.backend=mnemopi is active.

What it means

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.

Source

Thrown at packages/coding-agent/src/internal-urls/memory-protocol.ts:327

			const hindsightActive =
				backend === "hindsight" ||
				(mnemopiStates.length === 0 &&
					AgentRegistry.global()
						.list()
						.some(ref => ref.session?.getHindsightSessionState?.()));
			if (hindsightActive) {
				// Hindsight keeps memories server-side and exposes no
				// `memory://<id>` addressing, yet the shared `recall` tool
				// description still steers a follow-up `read memory://<id>`.
				// Return a corrective pointer so that stray read self-corrects in
				// one turn instead of derailing on the generic namespace error
				// (issue #7587).
				throw new Error(
					"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.",
				);
			}
			if (mnemopiStates.length === 0) {
				throw new Error(
					`Unknown memory namespace: ${namespace}. Supported: ${MEMORY_NAMESPACE} (file-backed memory summary), or a mnemopi memory id when memory.backend=mnemopi is active.`,
				);
			}
			const hit = tryResolveMnemopiMemory(namespace);
			if (hit) return renderMnemopiMemory(url, hit);
			throw new Error(
				`Mnemopi memory ${namespace} not found in any scoped bank. Use \`recall\` to list available ids.`,
			);
		}

		const roots = memoryRootsForContext(context);
		if (roots.length === 0) {
			throw new Error(
				"Memory artifacts are not available for this project yet. Run a session with memories enabled first.",
			);
		}

		let anyExists = false;

View on GitHub (pinned to 9690622007)

Solutions

  1. Use memory://root to read the file-backed memory summary.
  2. Start/enable a session with memory.backend=mnemopi before reading memory://<id>.
  3. Verify the id spelling and that it comes from a `recall` in the current mnemopi-backed session.

Example fix

// before
read("memory://mem_abc123") // no mnemopi backend active
// after
read("memory://root") // or enable memory.backend=mnemopi first
Defensive patterns

Strategy: validation

Validate before calling

const ns = url.rawHost || url.hostname;
if (ns !== "root" && !/^[a-z0-9-]+$/i.test(ns)) throw new Error(`Unsupported memory namespace: ${ns}`);

Try / catch

try {
  return await handler.resolve(url, ctx);
} catch (err) {
  if (err instanceof Error && err.message.startsWith("Unknown memory namespace")) {
    // fall back to memory://root or instruct user to enable mnemopi
  } else throw err;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/6e8ee1beca6d5355. Report an issue: GitHub.