Coding-agent memory

Memory that knows which repo it's in.

When you open a session in a git repo — whether through Claude Code, Codex CLI, Cursor, or anything else that speaks MCP — Remnic detects the project and branch automatically and scopes recall so that your past work on this repo shows up, and nothing from the other four repos you were in this week does.

What this means in practice

Project isolation

A fact written while you were working on acme/api is not recalled when you open a session in acme/web. The project id is a stable hash of the git origin URL (or the repo root path, when there's no origin), so the same repo always resolves to the same namespace — whether you cloned via SSH or HTTPS.

Opt-in branch scoping

Turn on codingMode.branchScope: true and writes route to project-<id>-branch-<name>. A branch-specific decision doesn't bleed into main. Reads from a branch still include project-level memories — deliberate asymmetry so project facts keep working everywhere.

Review-context recall

When the prompt looks like a review request (“review this PR”, “what changed in this diff?”), Remnic parses the unified diff and boosts memories whose entity refs mention any touched file. Strong unrelated memories still surface — the boost is a bias, not a filter.

Works across every connector

Claude Code and Codex CLI hooks resolve the git context automatically from the session's cwd. Clients that don't ship cwd (Cursor, generic MCP agents) can call the remnic.set_coding_context MCP tool at session start to declare the project/branch themselves.

The escape hatch

Project scoping ships on by default. If you want pre-2026 behaviour where a single flat namespace holds everything, set codingMode.projectScope: false in your plugin config. Branch scoping stays off by default — turn it on per-repo when a long-lived feature branch needs its own sandbox.

{
  "codingMode": {
    "projectScope": true,
    "branchScope": false
  }
}

Verify the overlay

Run remnic doctor from inside a git repo. The output includes a Coding-agent context line showing the detected projectId, branch, rootPath, and the effective namespace routing will use:

✓ Coding-agent context: project=origin:abcd1234, branch=main, root=/work/repo, defaultBranch=main, projectScope=true, branchScope=false, effectiveNamespace=project-origin-abcd1234

The projectScope and branchScope fields echo whatever is in your plugin config so the doctor output matches runtime behavior. Flip projectScope to false and the effective namespace collapses back to the plain default namespace.