Skip to content

One memkernel store across several coding tools (Claude Code, Codex, Cursor, Antigravity) #107

Closed

Description

@gosha70

Why

People switch between coding agents on one project, and each switch means explaining the project again: not only the code, but why decisions were made and what was already tried. memkernel is an MCP server, and Claude Code, Codex, Cursor and Antigravity can all use MCP servers, so in principle they can share one store. In practice, today:

  • Session-start context is automatic only in Claude Code (templates/hooks/session-start.py) and Kiro (templates/kiro/). In other tools the agent has the tools but nothing tells it to recall the latest checkpoint and decisions when a session starts.
  • One shared server is possible but untested. MEMKERNEL_TRANSPORT=streamable-http (with MEMKERNEL_HOST and MEMKERNEL_PORT, README "Transports") lets several clients connect to one memkernel process. But Evaluate moving to mcp 2.x #95 found that no test starts a real HTTP server: the e2e tests use an in-memory transport.
  • Several separate stdio servers on one store (each tool starting its own memkernel) is what most users would try first, and it is untested. The store locks (memkernel-0-7-store-locks) cover the wiki import and tag writes, and the first-open race is fixed (A new store's first open races between the SessionStart hook and the MCP server: "table collections already exists" #69), but the design case is one server plus its hooks, not several live servers writing at once.

The goal is one correct record across tools, not better recall than a shared file. memkernel's 0.5 evaluation found no detectable difference against files alone (eval/lifecycle-suite/report-0.5.0.md). What a store adds over a pasted AGENTS.md is keeping that record correct over time: superseded decisions are not returned, code memories are revalidated against changed files, and with wiki-studio only approved pages come back.

Proposed (for a spec)

  1. One shared server, documented and tested.
    • A README section: run memkernel once over Streamable HTTP and register it in each tool's MCP configuration.
    • An end-to-end test that starts the server as a process and drives it with a live MCP client (overlaps with Evaluate moving to mcp 2.x #95's transport tests; one can serve both).
  2. Session-start context in the other tools.
    • Instruction templates for Codex (an AGENTS.md block), Cursor (rules) and Antigravity, telling the agent to recall the latest checkpoint (recall(checkpoint_only=true, order="newest")) and the project's decisions at the start, with the wiki workflow kept in one place (One job, one set of instructions: memkernel's and wiki-studio's agent guidance overlap on the wiki workflow #86).
    • For tools with a hook or startup-command system: a small CLI, for example memkernel session-start, that prints the same block as the Claude Code hook (MemoryLifecycle.on_session_start). The roadmap already lists a "memkernel retain|recall|consolidate --json CLI for non-MCP harnesses".
    • Each tool's integration details (where rules live, whether a startup hook exists) are checked against that tool's current documentation when the spec is written.
  3. Several stdio servers on one store. Test concurrent writers from separate memkernel processes on one persisted store. Then either support it (with whatever locking it needs) or document plainly that the shared server (1) is the supported setup.

Out of scope

Acceptance (sketch)

  • A documented setup where two different MCP clients use one memkernel store, with a test that runs it.
  • In each tool covered, a new session starts with the latest checkpoint and the project's decisions, by hook or by instruction.
  • A tested answer, supported or documented as unsupported, for several stdio servers on one store.

Related: #95 (mcp 2.x and the real transport tests), #59 (transcript capture), #86 (one home per instruction), #85 (injected memory is quoted as data, which applies to these tools too).

Activity

  1. gosha70 commented on Nov 8, 2026

    @gosha70
    OwnerAuthor

    Framing the goal as one correct record, not better recall than a file, is the right bar. The weak spot is the one you named: recall only happens if the agent is told to call it, so tools without a session-start hook will skip it. One HTTP server plus a thin session-start command looks like the safest path. I build ArcRoom AI for the same problem. We went hosted, with hooks in Claude Code, Codex and Cursor that record sessions and hand the next one what is relevant, so no agent has to remember to call. https://www.arcroomai.com/?ref=github Is this for your own tools, or a team sharing one store?

    Thanks! Recall is only as reliable as whatever triggers it, and that's what item 2 is about.

    To your question: for now - it's for one developer using several coding tools on the same machine; MemKernel stays self-hosted and local by design: the store lives next to the code, and no session data leaves the machine. So a hosted recorder isn't the direction for this issue.

    One thing that would help: you mentioned session hooks in Codex and Cursor. Do you have links to the docs for those? When the spec is written, I'll check each tool's current docs before deciding where a hook can replace instructions.

  2. added 5 commits that reference this issue on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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