Skip to main content
Use Claude Code with Valar and choose models with /model. Install the Valar CLI and configure your coding key first.

Choose a routing lane

valar claude on uses the proxy when usable and otherwise selects direct routing. It explains the selected lane. Add --direct to choose direct routing explicitly.

Enable routing

For the proxy lane on macOS or Windows:
See On-device proxy for certificate trust, administrator access, and corporate networks. To deploy with MDM, see Roll out with MDM. For direct routing:
Check the result:
Claude Code and Claude Desktop have independent routing controls. This command changes the CLI in your terminal; use valar claude-desktop on for the app. Valar leaves your Claude Code version unchanged unless you use the version-hold options.

Model selection

Valar updates the /model picker with the models available to your coding key. An explicit valar claude on selects the Valar default, normally Valar Auto. You can choose another model; that choice persists until the next explicit on. With quota-first enabled, eligible Claude-model requests can use your subscription. See Quota-first for model and account behavior.

Stable Claude Code

To enable routing and hold Claude Code at Valar’s stable release:
This requires Claude Code from Anthropic’s native installer. Valar installs the selected release with claude install <version>, then sets DISABLE_AUTOUPDATER=1 in Claude Code’s settings to stop automatic updates. You can still run claude update manually. If installation fails, Valar does not add the hold or change routing. The hold survives later plain valar claude on commands and Valar upgrades. When Valar’s stable release moves forward, the next valar claude on installs it and keeps the hold. It never moves Claude Code back to an older release. To remove Valar’s hold and update Claude Code now:
On a native installation, this removes Valar’s hold and runs claude update. For npm or Homebrew installations, it removes Valar’s hold; update Claude Code through your package manager. --stable does not support package-manager installations. valar claude off also removes Valar’s hold. Both OFF and --latest preserve a DISABLE_AUTOUPDATER setting you had before enabling Valar, so automatic updates can remain disabled. Neither flag changes your autoUpdatesChannel setting. Use one version option at a time. Neither works with --single-session, because both affect the installed Claude Code. valar claude status reports a Valar-managed hold. valar configure --stable and valar configure --latest do the same: they save your configuration, then run valar claude on --stable or valar claude on --latest, which also turns routing on. valar upgrade updates Valar itself.

Switch lanes and running sessions

Switch directly between lanes without turning routing off first:
When the change requires refreshing running sessions, Valar asks before interrupting them:
  • No: the requested routing change and session restart are cancelled.
  • Yes: Valar updates routing, attempts to recover background agents, and closes affected interactive sessions. Reopen saved conversations with claude --resume or reopen claude agents.
  • --force: approve the same interruption without a prompt. It does not make an unnecessary restart happen during an ordinary proxy toggle.
Saved conversations remain available. Interrupted requests and tools are not replayed automatically. A session running the Valar command itself is left open; restart it from an external terminal if instructed. Recovery is best effort. If a session cannot refresh, Valar reports it and applies the routing configuration. That process can keep its previous routing until you restart it. Once the proxy arrangement is established, ordinary proxy ON/OFF toggles need no restart. Changing the lane, certificate, or proxy connection settings can require one again.

Quota-first: use your own subscription first

Quota-first requires the proxy lane and a Claude login with included subscription allowance. It is unavailable on direct routing, including Linux.
The preference is shared with Claude Desktop and read live by the proxy. Each request uses the account carried by its login.
  • Eligible Claude-model requests use included subscription allowance while available. Requests that cannot use it, including requests that would incur extra usage, use Valar.
  • Enterprise accounts and accounts without included allowance use Valar.
  • Valar Auto and explicit open-model selections always use Valar.
To send every routed request through Valar:
To clear temporary subscription holds and retry on the next eligible request:
valar claude-desktop reset is equivalent. Reset applies to the shared proxy; it does not erase counters or reset the subscription allowance.

Check what is serving

Send a request, then inspect valar claude status. The account may not be known until a request carries your login. If Claude Code and Desktop are signed into different accounts, their status can show different limits. Checked shows when quota information was confirmed. Served counts subscription and Valar requests, split into main and background calls. The same account used by both apps shares counters; different accounts do not. These counters are temporary diagnostics and can reset, including when the proxy restarts. They are not billing totals. On the proxy lane, valar claude status --verify checks successful Valar forwarding. A request served by your subscription alone does not satisfy that check; select Valar Auto or temporarily disable quota-first for the test.

Route a single session

This launches one Claude Code process on the direct lane, using temporary settings. It does not rewrite your main Claude settings, save a new routing preference, or change other sessions. Single-session routing does not support quota-first. When the process exits, its routing ends.

Turn off routing

On the proxy lane, new connections pass through to Anthropic without decryption. Proxy pointers remain installed for the next ON, and the services keep running. Remove them with the shared proxy teardown. On the direct lane, Valar removes its endpoint and credential settings and restores the settings it previously replaced. Running sessions may need recovery; follow the prompt or use --force when interruption is acceptable. If recovery is incomplete, existing direct sessions may still send requests to Valar until restarted. When Valar can safely merge readable settings, OFF preserves unrelated changes such as plugins, theme, permissions, and hooks.

What gets written

Both lanes use Claude Code’s settings file, normally ~/.claude/settings.json. Valar does not install a launcher wrapper. The optional version hold uses Claude Code’s own installer and updater. Valar saves the original settings before its first change and keeps credentials in user-only files. If you log into Claude after enabling direct routing without a login, rerun valar claude on so the configuration can reflect the new login.

Upgrading an older installation

Run valar upgrade from your own terminal session. The upgrade removes the retired socket routing and preserves your routing choice where it can safely determine it. If no usable on-device proxy is installed, Claude Code moves to the direct lane. Your quota-first preference stays saved, but requests use Valar until you set up the proxy and enable its lane. On macOS, that setup may require administrator access. Read any session-recovery warnings. See Upgrade and recovery before retrying a failed migration.

Next steps

On-device proxy

Shared proxy setup and corporate networks.

Claude Desktop

Configure the app separately from the CLI.