JuliusBrussee/caveman · error

cave_memory_shared_backend_unavailable

Error message

cave_memory_shared_backend_unavailable

What it means

Error "cave_memory_shared_backend_unavailable" thrown in JuliusBrussee/caveman.

Source

Thrown at packages/agent/src/runtime.ts:3116

    },
  };
}

function validEngineTokenCount(value: unknown): number | undefined {
  return Number.isSafeInteger(value) && Number(value) >= 0 ? Number(value) : undefined;
}

function localMemoryTools(
  definition: NonNullable<AgentDefinition["memory"]>,
  agentId: string,
  config: MemoryStoreConfig | undefined,
): AgentTool<TSchema>[] {
  // Defense in depth: memory() already rejects a non-local provenance/consent at
  // construction, but a hand-built MemoryDefinition must still fail
  // BEFORE the run spends — not inside a tool call — so this throws at tool
  // setup, never at execute time.
  if (definition.provenance !== "local" || definition.consent !== "local_only") {
    throw new Error("cave_memory_shared_backend_unavailable");
  }
  // Resolved once so a validation failure surfaces at setup, and every entry is
  // scoped by (tenant, agentId, namespace): two AgentDefinitions declaring the
  // same namespace in one process write to different files and never bleed.
  const filePath = memoryFilePath(config, agentId, definition.namespace);
  const ttl = memoryTTLMilliseconds(definition.ttl);
  const recall: AgentTool<TSchema> = {
    name: "cave_memory_search",
    label: "cave_memory_search",
    description: "Recall relevant local memory from declared namespace. Returns bounded local evidence only.",
    parameters: Type.Object({ query: Type.String() }),
    executionMode: "parallel",
    async execute(_toolCallId, params) {
      const query = (params as { query: string }).query;
      const now = Date.now();
      // Eviction on read: a memory past its declared ttl is neither returned nor
      // kept — the durable set is rewritten with only the live entries.
      const live = await mutateMemories(filePath, (entries) =>

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Shared memory backend is not configured; use local memory or configure a shared backend.

When it happens

Trigger: Thrown at packages/agent/src/runtime.ts:3116 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/fa576ac61f82cbde. Report an issue: GitHub.