May 15, 2026 · 4 min read

v0.4.20: Multi-Agent Targeting and Input/Output Savings Split

Target specific AI coding agents with --agent, see accurate cost savings split by input and output tokens, and get reliable upgrade version detection.

Target the agent you actually use

cce init has always auto-detected your editor. That works well when you have Claude Code installed. But if you only use Codex, or only use Copilot, auto-detection could miss your setup or write config files you don't need.

Now you can be explicit:

cce init --agent codex      # Codex only: ~/.codex/config.toml + AGENTS.md
cce init --agent copilot    # VS Code only: .vscode/mcp.json + .github/copilot-instructions.md
cce init --agent claude     # Claude only: .mcp.json + CLAUDE.md
cce init --agent all        # Every supported editor
cce init                    # Auto-detect (same as before)

Each flag writes exactly what that agent needs. No surprise edits to files belonging to other editors.

What gets written

FlagMCP configInstruction file
--agent claude.mcp.jsonCLAUDE.md
--agent codex~/.codex/config.tomlAGENTS.md
--agent copilot.vscode/mcp.json.github/copilot-instructions.md
--agent allAll of the above + Cursor, Gemini, OpenCode, TabnineAll instruction files

--agent all is computed from the editor registry at runtime. When new editors are added to CCE, all picks them up automatically.

Input and output savings, split correctly

Before this release, cce savings priced everything at the input token rate. That was wrong. Output tokens cost 5x more than input tokens on Opus ($75/1M vs $15/1M). A small output savings is worth more in dollars than a large input savings.

The savings report now splits these correctly:

  Input savings   8.6k  tokens   $0.13
  Output savings  325  tokens   $0.02
  ──────────────────────────────────────────
  Total saved   8.9k  tokens   $0.15
  ~4.5k tokens / query  ~$0.08 / query

  Breakdown:
    retrieval              48%  ▰▰▰▰▰▰▰▰▰▰    6.0k    $0.09 · 1 call
    chunk compression      20%  ▰▰▰▰▱▱▱▱▱▱    2.6k    $0.04 · 1 call
    output compression*     2%  ▰▱▱▱▱▱▱▱▱▱     325    $0.02 · 1 call

  Cost estimate based on Opus pricing (input $15/1M, output $75/1M)

The pricing module now fetches both input and output rates from the Anthropic docs page. Old cache files from previous versions are migrated automatically.

Upgrade version detection fix

cce upgrade had a bug where it always reported "Already on latest version" even after a successful upgrade. The running process couldn't see the new version metadata because uv tool upgrade installs into a separate virtual environment.

The fix: after upgrading, CCE shells out to the upgraded binary with --version to read the real post-upgrade version. Simple, reliable.

Upgrade

cce upgrade

Or manually:

uv tool upgrade code-context-engine

Existing projects: Run cce init --agent all if you want to add instruction files for Codex and Copilot. Your existing CLAUDE.md and .mcp.json will be preserved.

Full changelog

Get started

Install CCE and start saving tokens in under a minute.

GitHub →
release v0.4.20 multi-agent token-savings codex copilot