Feature request: project-level scope for Claude Code Agent Config

Author: vivashu27Created Sep 26, 2026Updated Sep 26, 2026

Problem

When CCR applies a Claude Code profile, it writes ANTHROPIC_* environment variables (base URL, auth token, model overrides) into the user-level ~/.claude/settings.json. Because this file applies globally, every plain claude session afterwards is routed through CCR as well.

This breaks using Claude Code normally with a Claude subscription (Pro/Max) alongside CCR. On launch, Claude Code shows:

claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and takes precedence over your claude.ai login

Currently the only workaround is to manually delete the env entries from ~/.claude/settings.json each time.

Steps to reproduce

  1. Create a Claude Code profile in Agent Config
  2. Run ccr ui (or launch the profile).
  3. Check ~/.claude/settings.json: the env block now contains ANTHROPIC_* entries.
  4. Run plain claude: it uses CCR instead of the claude.ai login.

Expected behavior

Plain claude should be unaffected unless I explicitly choose a system-wide scope.

Proposed solution

  • Add a Project effect scope that writes overrides to <project>/.claude/settings.local.json instead of the user-level file, so that only a chosen project uses CCR.
  • Ensure the "Only opened from CCR" scope never writes to ~/.claude/settings.json and injects variables only into the launched process.
  • Optionally: remove the entries CCR added when a profile is disabled, deleted, or switched away from System default.

Environment

  • CCR version: 3.1.1
  • Install type: npm CLI

Source: musistudio/claude-code-router