Skip to content

Multi-environment bank strategies: shared banks across integration types #676

@jwade83

Description

@jwade83

Use Case

I run two environments against the same project — Claude Code for implementation, and a separate Claude-based environment for research and design. Both need long-term memory over the same domain, but they produce different content: one generates code decisions, the other generates design rationale.

The Claude Code plugin's dynamicBankId (#651) handles isolation well. The harder problem is intentional sharing — when two environments should read from and write to the same bank with different retention patterns.

Problem Statement

When multiple environments write to the same bank, three tensions emerge:

  1. Cross-environment feedback loops. [Bug] Memory feedback loop: Recalled memories re-retained on every turn, causing unbounded database growth #360's fix addressed self-reinforcement via tag stripping before retain. But cross-environment reinforcement is the same risk at a different layer — Environment A recalls what B retained, re-retains a derivative. Tag stripping doesn't help because the content isn't tagged as injected recall.

  2. Retention cadence collision. The chunked retention model from openclaw plugin: O(n²) storage growth from retaining full message history every turn #451 assumes a single writer. Two environments retaining at different cadences produce unpredictable interleaving — duplicate extraction on overlap, potential gaps between windows.

  3. No provenance on memories. A bank is symmetric — anything that connects can recall and retain equally. In practice, an implementation environment produces reliable facts about what was built; a research environment produces reliable facts about why. Flattening both through the same extraction pipeline loses that signal.

How This Feature Would Help

Practitioners running specialized agents could share context without duplicate accumulation, feedback loops, or provenance loss. This seems likely to grow more relevant as the integration surface expands — Claude Code, OpenClaw, and MCP are three write paths into the same bank infrastructure.

Proposed Solution

Directions that might be worth exploring:

Alternatives Considered

Current workaround: separate banks per environment, manual cross-pollination via export/import. Works but loses real-time recall and scales poorly.

Priority

Important - affects my workflow

Additional Context

dynamicBankGranularity handles single-environment isolation well. This is about the next layer — when isolation isn't what you want. #360, #451, and #611 touch adjacent edges but the cross-environment coordination question hasn't surfaced yet.


  • I would be willing to contribute this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions