JuliusBrussee/caveman · error

cave_memory_provenance_unsupported

cave_memory_provenance_unsupported

Error message

cave_memory_provenance_unsupported: only "local" memory is supported

What it means

Fail-closed guard in memory(): provenance is 'project' or 'external', but the durable store only implements local single-tenant memory. A shared-backend contract the package does not provide is refused at construction, before any model spend.

Source

Thrown at packages/agent/src/primitives.ts:286

  if (!/^[a-z0-9][a-z0-9_-]{0,95}$/.test(options.namespace)) {
    throw new Error(`caveman agent: invalid memory namespace ${JSON.stringify(options.namespace)}`);
  }
  if (!Number.isSafeInteger(options.recallBudget) || options.recallBudget < 0) {
    throw new Error("caveman agent: memory recallBudget must be a non-negative integer");
  }
  try {
    memoryTTLMilliseconds(options.ttl);
  } catch {
    throw new Error("caveman agent: memory ttl must use positive m, h, or d duration");
  }
  // Fail closed at CONSTRUCTION, not at tool-call time: the durable
  // store implements only local, single-tenant memory. A `project`/`external`
  // provenance or a `project_shared` consent is a shared-backend contract this
  // package does not provide, so it is refused here rather than burning a model
  // turn to discover a config the framework already knew was unsupported.
  const provenance = options.provenance ?? "local";
  if (provenance !== "local") {
    throw new Error("cave_memory_provenance_unsupported: only \"local\" memory is supported");
  }
  const consent = options.consent ?? "local_only";
  if (consent !== "local_only") {
    throw new Error("cave_memory_consent_unsupported: only \"local_only\" consent is supported");
  }
  return Object.freeze({
    kind: "memory",
    namespace: options.namespace,
    provenance,
    ttl: options.ttl,
    recallBudget: options.recallBudget,
    consent,
  });
}

export type ContextKind =
  | "instruction"
  | "user_intent"

View on GitHub (pinned to 766dce6b13)

Solutions

  1. Set provenance: 'local' (or omit it) in memory()
  2. Keep shared/project memory out of definitions until a shared backend ships
  3. Hand-build MemoryDefinition only with local provenance
Defensive patterns

Strategy: validation

When it happens

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

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18). Data as JSON: /api/errors/606203f5593e31f4. Report an issue: GitHub.