Skip to content

MCP capture pipeline is unreachable when the agent's session root differs from the wired repo #630

Description

@MongLong0214

Found during first real use of v0.8.2, working on MongLong0214/agent-control-plane.

What happened

The capture pipeline is MCP-only — commitlore_prepare_capture, commitlore_verify_capture, commitlore_stage_capture have no CLI equivalent (commitlore --help lists parse, sync, pre-push, validate, uninstall, hooks, index, context, limits, ruled-out, warnings).

MCP servers are loaded from the agent session's root project, not from the repository the agent is editing. My session root is ~/projects/repo-factory; all my work is in ~/projects/agent-control-plane, which is where .mcp.json wires commitlore mcp. So:

~/projects/agent-control-plane/.mcp.json   → { "command": "commitlore", "args": ["mcp"] }   ✅ wired
~/projects/repo-factory/.mcp.json           → does not exist                                 ❌ session root

Result: the three capture tools are not in my tool list at all. The read side is fine — commitlore context <path> works from the CLI regardless of session root, and correctly returned no active records for src/guard/managed-write-guard.ts.

Reproduction

  1. wire .mcp.json with commitlore mcp in repo A
  2. start an agent session rooted in repo B
  3. from that session, cd into repo A and do the work there — the normal shape when one session drives several repositories
  4. the capture tools are absent; commitlore context still works

Why it matters

This is not an exotic setup. A single agent session commonly works across several repositories — the owner's own note says six repos are wired. Under the current design, capture only reaches the one repo that happens to be the session root, and the others silently get the read side only. Nothing warns you: the tools are simply not there, and an agent that does not check will conclude there is nothing to record.

What would fix it

Any one of:

  • a CLI equivalent for the three capture steps, so capture works wherever commitlore is on PATH — this also makes capture scriptable and testable without an MCP host
  • path-scoped MCP discovery, so the server is picked up from the repository being edited rather than the session root
  • a documented note that capture requires the session root to be the wired repo, plus a way to detect it — for example commitlore doctor reporting "capture unavailable from this session root"

The CLI route seems strongest: it removes the coupling to the host's MCP loading rules entirely.

Environment

commitlore 0.8.2 · macOS (Darwin 25.3.0) · Node 22 · Claude Code session

Activity

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

    release:0.9.0Must close before 0.9.0: an unaware user gets a wrong result, or the docs already promise it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions