Multi-Agent Support
Code Context Engine works with any AI coding agent that supports MCP (Model Context Protocol). The cce init command auto-detects which agents are present in your environment and configures them automatically.
The --agent flag
Section titled “The --agent flag”cce init # Default. Detects installed agents.cce init --agent claude # Configure only Claude Codecce init --agent copilot # Configure only VS Code / Copilotcce init --agent codex # Configure only Codex CLIcce init --agent pi # Configure only Picce init --agent all # Configure all supported agentsWhen no --agent flag is provided, cce init defaults to auto, which scans for known config files and editor directories.
Supported Editors and Agents
Section titled “Supported Editors and Agents”| Agent | MCP Config | Instruction File | Scope | Detection |
|---|---|---|---|---|
| Claude Code | .mcp.json | CLAUDE.md | Project | Always configured |
| VS Code / Copilot | .vscode/mcp.json | .github/copilot-instructions.md | Project | .vscode/ exists |
| Cursor | .cursor/mcp.json | .cursorrules | Project | .cursor/ or .cursorrules exists |
| Gemini CLI | .gemini/settings.json | GEMINI.md | Project | .gemini/ or GEMINI.md exists |
| Codex CLI | ~/.codex/config.toml | AGENTS.md | User (global) | ~/.codex/ or VS Code OpenAI extension |
| OpenCode | opencode.json | (none) | Project | opencode.json exists |
| Tabnine | .tabnine/agent/settings.json | TABNINE.md | Project | .tabnine/ exists |
| Pi | .mcp.json | AGENTS.md | Project | .pi/ exists |
How it works
Section titled “How it works”Each agent integration does two things:
- Registers the MCP server so the agent can call
context_searchand other CCE tools. - Writes an instruction file telling the agent to prefer CCE’s search over raw file reads.
The instruction file content is managed by CCE and wrapped in markers (CCE:BEGIN / CCE:END) so it can be updated on upgrade without touching your own content.
Cross-agent memory
Section titled “Cross-agent memory”Decisions, code areas, and session history are stored per-project in memory.db, not per-agent. If you switch between Claude Code and Codex on the same project, session_recall returns decisions from all prior sessions regardless of which agent created them.
Re-running for additional agents
Section titled “Re-running for additional agents”You can run cce init --agent <name> multiple times. Each run is additive and will not remove previously configured agents.
cce init --agent claudecce init --agent copilot # Adds Copilot config alongside ClaudeOr configure everything at once:
cce init --agent allCommon issues across all agents
Section titled “Common issues across all agents””cce: command not found”
Section titled “”cce: command not found””The cce binary must be on your PATH. Default locations by install method:
| Install method | Binary location |
|---|---|
uv tool install | ~/.local/bin/cce |
pipx install | ~/.local/bin/cce |
pip install | Depends on your Python environment |
Add ~/.local/bin to your shell profile (~/.zshrc, ~/.bashrc, or equivalent).
Agent doesn’t use context_search
Section titled “Agent doesn’t use context_search”- Check the instruction file exists (CLAUDE.md, AGENTS.md, .cursorrules, etc.)
- Verify it contains the
## Context Engine (CCE)section - Restart the agent after setup
- Re-run
cce initif the instruction file is missing
Savings not updating
Section titled “Savings not updating”Savings only increment when the agent calls context_search or expand_chunk. If the agent uses Read/Grep directly, no savings are recorded. Check cce savings for a “last query” timestamp to confirm whether new queries are happening.
Windows encoding errors
Section titled “Windows encoding errors”Upgrade to CCE v0.4.24+ which adds explicit UTF-8 encoding to all file I/O. Earlier versions can crash with UnicodeDecodeError when config files contain non-ASCII bytes.