gastownhall/beads · error

proxied-server provider %T does not offer the persistent-mem

Error message

proxied-server provider %T does not offer the persistent-memory surface

What it means

memoriesFromProvider asserts that the UnitOfWorkProvider handed to it implements uow.MemoriesSource (a Memories() accessor). The root pre-run deliberately opens nothing for noDbCommands like `bd prime`, so the provider is a proxied/lazy server handle; if that handle does not expose the persistent-memory surface, the code cannot read or write memories and fails with this type-assertion error naming the concrete type %T.

Source

Thrown at cmd/bd/memory.go:55

// invocation's proxied-server provider, through the provider's OWN capability
// accessor — the same two-step proxiedWorkspaceConfig performs.
func proxiedMemories() (memoryops.Memories, error) {
	if uowProvider == nil {
		return nil, errors.New("proxied-server UOW provider not initialized")
	}
	return memoriesFromProvider(uowProvider)
}

// memoriesFromProvider is that accessor step for a provider the caller names.
//
// It takes the provider rather than reading the global one because `bd prime`
// opens a provider SCOPED to its read — prime is in noDbCommands, so the root
// pre-run opens nothing — and one spelling of "ask this provider for the memory
// surface" is the whole point of having an accessor at all.
func memoriesFromProvider(provider uow.UnitOfWorkProvider) (memoryops.Memories, error) {
	src, ok := provider.(uow.MemoriesSource)
	if !ok {
		return nil, fmt.Errorf("proxied-server provider %T does not offer the persistent-memory surface", provider)
	}
	return src.Memories()
}

// noteDirectMemoryWrite marks the invocation as having written, which is what
// the auto-commit epilogue in main.go keys on.
//
// It is DIRECT-ROUTE ONLY, and both halves of that matter. A direct memory
// write lands in the Dolt working set and nothing else commits it, so a verb
// that forgets to call this stores a memory that exists until the process exits
// and then sits uncommitted — visible to the session that wrote it and to
// nothing after. A proxied write already committed inside the role's unit of
// work, so flagging it there would ask the epilogue to commit a second time on
// a route with nothing outstanding.
//
// The RunEs cannot make that distinction themselves: openMemories hides which
// route they are on, which is the point. So the guard lives here, once, the way
// noteDirectConfigWrite does for the settings plane.

View on GitHub (pinned to 71377f2769)

Solutions

  1. Upgrade the bd daemon/server so the proxied provider implements uow.MemoriesSource
  2. Verify client and server versions match (`bd --version` on both sides)
  3. If memories are unavailable intentionally, skip the memory plane instead of calling primeProxiedMemoryPlane
  4. Extend the proxy's provider construction to include the memories source when the backend supports it

Example fix

// before
mems, err := memoriesFromProvider(prov)
// after
if _, ok := prov.(uow.MemoriesSource); !ok {
    return nil // memory surface unavailable; proceed without it
}
mems, err := memoriesFromProvider(prov)
Defensive patterns

Strategy: type-guard

Validate before calling

// check the provider capability before use
if _, ok := prov.(uow.MemoriesSource); !ok { skipMemoryPlane(); }

Type guard

function hasMemories(p uow.UnitOfWorkProvider) (uow.MemoriesSource, bool) { src, ok := p.(uow.MemoriesSource); return src, ok }

Try / catch

mems, err := memoriesFromProvider(prov)
if err != nil && strings.Contains(err.Error(), "does not offer the persistent-memory surface") {
    return nil // degrade gracefully
}

Prevention

When it happens

Trigger: Calling proxiedMemories / primeProxiedMemoryPlane when the proxied-server provider was constructed without the memories capability (e.g. server version predates the memory plane, or the proxy was built from a narrower interface).

Common situations: Running `bd prime` against an older daemon that doesn't implement the memory RPC; a proxy wrapping only issue CRUD; mismatched bd client/server versions.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/4bc1022fcb04be02. Report an issue: GitHub.