Skip to content

IDE extensions

You don’t have to launch Claude Code from the terminal to get routing. The official Claude Code IDE extensions can route through the proxy too - install the notdiamond hooks once, point the extension at your running proxy, and every request from the editor is routed.

Editor Extension Notes
VS Code (and forks: Cursor, Windsurf, Kiro) Claude Code (anthropic.claude-code) First-party. Bundles its own copy of the CLI.
JetBrains - IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, Android Studio (and most JetBrains IDEs) Claude Code [Beta] First-party. Requires the notdiamond / claude CLI installed separately.

Any other tool that speaks the Anthropic API and honours global Claude Code hooks and ANTHROPIC_BASE_URL will work the same way.

Run notdiamond init first if you haven’t set up your credentials yet.

Terminal window
notdiamond hooks install # add hooks and environment variables below
notdiamond hooks uninstall # remove hooks and environment variables below

In the CLI, notdiamond claude installs hooks automatically to ensure features for routing can be extracted reliably. The IDE extensions launch Claude Code themselves, so notdiamond claude never runs, meaning we have to install the hooks separately.

The install writes the following to ~/.claude/settings.json, which every Claude Code session reads:

  • Hooks: SessionStart starts the proxy if needed, UserPromptSubmit marks human prompts, and PreModelSwitch refuses /model and the model picker. Each one compares the session’s ANTHROPIC_BASE_URL against your proxy (localhost, 127.0.0.1 or [::1] at the configured port) and exits immediately if it doesn’t match.
  • The pin: model and effortLevel start every session on claude-opus-5[1m] at xhigh, CLAUDE_CODE_EFFORT_LEVEL locks /effort, and CLAUDE_CODE_DISABLE_FAST_MODE closes /fast. It also sets ENABLE_TOOL_SEARCH=true, to reduce context window utilization overhead.

Note the settings values can’t be gated, so the pin applies to every Claude Code session on the machine after install, terminal included. When you run notdiamond hooks uninstall, it removes every key that still holds the installed value - including ones that were there before the install. Make sure you re-add anything you want to keep.

VS Code, Cursor and Windsurf - add this to the editor’s settings.json (Command Palette → Preferences: Open User Settings (JSON)), then reload the window:

{
"claudeCode.environmentVariables": [
{ "name": "ANTHROPIC_BASE_URL", "value": "http://127.0.0.1:8082" },
{ "name": "ANTHROPIC_AUTH_TOKEN", "value": "notdiamond-proxy" }
]
}
  • ANTHROPIC_BASE_URL points the editor at the local proxy. Match the port to your server.port if you changed it in Configuration.
  • ANTHROPIC_AUTH_TOKEN is a sentinel value for API-key-backed proxy modes. Claude Code only routes to a custom base URL when an auth token is present; without it the extension falls back to the Anthropic login screen. The proxy ignores the value - notdiamond-proxy is just a placeholder.

Keeping this in the editor’s settings rather than ~/.claude/settings.json scopes routing to that editor, so a terminal claude on the same machine isn’t routed.

JetBrains - the plugin has no environment setting of its own, so use an env block in ~/.claude/settings.json instead:

{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8082",
"ANTHROPIC_AUTH_TOKEN": "notdiamond-proxy"
}
}

That block applies to every Claude Code session on the machine, terminal included. notdiamond claude handles it correctly - it detects the installed hooks and does not double up on them.

Open the Claude Code panel in your editor and start a session. Requests now flow through the proxy; check notdiamond logs -f or the dashboard to confirm they’re being routed.

  • JetBrains runs your installed CLI directly, so once ~/.claude/settings.json is set it routes reliably. Point the plugin at the binary under Settings → Tools → Claude Code [Beta] → Claude command if it isn’t auto-detected.
  • VS Code bundles its own CLI build. Keep the extension up to date - some 2.0.x releases shipped a regression that ignored ANTHROPIC_BASE_URL.

Start with notdiamond doctor. It reports whether the hooks are installed, whether they still match your configured port, and whether the pin is still in place.

/model, /effort or /fast is refused in the editor. That’s the pin from step 1 - the same lock notdiamond claude applies in the terminal. notdiamond hooks uninstall releases it.

Requests show up on the logs, but new prompts keep reusing an earlier model. The human-turn hook may not be running. Re-run notdiamond hooks install after any change to server.port, then restart the Claude Code session. Older hook installations matched only the configured hostname, so update notdiamond and reinstall the hooks if you use localhost while the proxy is configured for 127.0.0.1.

The editor shows the Anthropic login screen instead of routing.

  1. Confirm the settings are in the right file: the editor’s own settings.json for VS Code, ~/.claude/settings.json for JetBrains. API-key-backed proxy modes need both ANTHROPIC_BASE_URL and the sentinel ANTHROPIC_AUTH_TOKEN; forwarded credential mode should only set ANTHROPIC_BASE_URL and must not use the notdiamond-proxy placeholder.
  2. Update the Claude Code extension to the latest version.
  3. Launch the editor from a terminal (code .) rather than the Dock/Finder - GUI launches don’t always inherit the right environment.

Every session fails to connect. The proxy isn’t running and the hook couldn’t start it, usually because the login expired. Run notdiamond login, then notdiamond start.