CommitMind Code setup

CommitMind Code is a coding agent built on OpenCode and bundled with the commitmind binary. You launch it by typing mind in your terminal. Unlike Claude Code or Cursor, which need a separate MCP config to talk to CommitMind, mind ships with the CommitMind plugin baked in — memory, code-intel, task tracking, and routing rules are all active from the first message.

Install

CommitMind Code is included in the standard commitmind binary — no separate install step.

$ curl -fsSL https://commitmind.dev/install.sh | bash

Then launch it from inside any repo:

mind

Or equivalently:

commitmind code

What's pre-wired

When you open mind, the CommitMind plugin automatically injects three blocks into every chat's system prompt before the model sees your first message:

| Block | What it contains | |---|---| | Active task header | Title, phase, and last transition note for whichever task is pinned in your session | | Routing rules | The full STOP-rules table and tool-routing guide (memory tools first, xref for code location) | | Recent activity | Last 5 commit summaries, observations, and decisions for the project — equivalent to a lightweight prime_session |

Because the recent activity is already in the system prompt, the agent does not need to call prime_session at conversation start. The MCP tools (task_get_active, search_memory, xref, etc.) are still available for deeper mid-session lookups.

MCP tools

mind runs two CommitMind MCP servers under the hood — the same two that other editors wire via config:

No .mcp.json file is needed — the servers start automatically with the app.

CLAUDE.md loading

By default, mind does not load CLAUDE.md from your repo. The routing rules and project conventions are delivered via the CommitMind plugin instead, keeping the system prompt clean and avoiding duplicate instructions.

If you have a CLAUDE.md you want mind to pick up — for example, a repo also used with Claude Code — set the environment variable before launching:

OPENCODE_ENABLE_CLAUDE_CODE_PROMPT=1 mind

Or export it in your shell profile:

export OPENCODE_ENABLE_CLAUDE_CODE_PROMPT=1

When the flag is set, mind loads CLAUDE.md (project-level, found by walking up from the working directory) and ~/.claude/CLAUDE.md (global) using the same priority order as Claude Code: AGENTS.md wins over CLAUDE.md if both exist at the same level.

Note. OPENCODE_DISABLE_CLAUDE_CODE=1 is the master switch — it disables CLAUDE.md loading unconditionally, regardless of OPENCODE_ENABLE_CLAUDE_CODE_PROMPT.

Project instruction files

The preferred way to add project-specific instructions in mind is AGENTS.md. It is always loaded (not gated by any flag) and takes priority over CLAUDE.md when both are present.

Place it at the repo root or in any subdirectory — mind walks up from the current working directory and uses the first match it finds:

<repo>/AGENTS.md       ← loaded for the whole project
<repo>/src/AGENTS.md   ← loaded only when reading files under src/

You can also add instruction files or URLs via the commitmind-code.json config:

{
  "instructions": [
    "docs/agent-guide.md",
    "https://example.com/shared-conventions.md"
  ]
}

Entries in instructions are additive and always loaded — they are not affected by the CLAUDE.md flag.

Relationship to other editors

mind and Claude Code / Cursor can coexist in the same repo. The CommitMind memory layer (search_memory, log_observation, decisions, tasks) is project-scoped, so observations and decisions written in a mind session are visible in a subsequent Claude Code session and vice versa.

The only thing that differs is how each editor gets its routing rules and recent-activity context:

| Editor | Routing rules | Recent activity | CLAUDE.md | |---|---|---|---| | CommitMind Code (mind) | Baked into the plugin (always) | Injected at chat start (always) | Off by default — opt in with OPENCODE_ENABLE_CLAUDE_CODE_PROMPT=1 | | Claude Code | Via CLAUDE.md (auto-primed hook appends recent-activity block) | Via auto-prime.sh SessionStart hook | Always loaded | | Cursor | Via .cursor/rules/commitmind-*.mdc + session hook | Via Cursor sessionStart hook | Loaded (Cursor uses same instruction.ts path) | | VS Code | Via .github/copilot-instructions.md or workspace instructions | Not auto-injected | Loaded |