Claude Code Integration

Claude Code Integration

Bring Ask Sage's AI models directly into your terminal with Claude Code CLI

Claude Code CLI

Table of Contents
  1. Prerequisites
  2. Installation
  3. Configuration Methods
  4. Interactive sign-in via Claude Desktop
  5. Choosing a model
  6. Privacy & Data Usage Controls
  7. DoD/DoW Network Configuration
  8. Troubleshooting
  9. Additional Resources

Instance-Specific Base URL: The endpoints and configuration shown reflect the instance at chat.asksage.ai. The api. prefix and path suffix stay the same across deployments — only the instance segment in the middle changes based on which Ask Sage instance you are logging into. Always use the instance approved by your organization and applicable regulatory requirements, and match the base URL in your configuration to the instance you authenticate against.


Prerequisites

Prerequisites

Before you begin, ensure you have the following:

Ask Sage Account

Sign up or log in

Ask Sage API Key

Valid user API Key from Ask Sage

Claude Code

Installed on your system — see Installation

Supported OS

macOS 13+, Windows 10 1809+, Ubuntu 20.04+, Debian 10+, or Alpine 3.19+ · 4 GB+ RAM · x64 or ARM64

Prefer signing in over managing a key? Claude Code sessions launched from Claude Desktop inherit the token from Desktop's interactive Ask Sage sign-in, so no API key is needed on the device at all. See Interactive sign-in via Claude Desktop.

Installation

Installation

Claude Code can be installed in two ways:

Option 1: VSCode Extension

Install the Claude Code extension directly in Visual Studio Code:

1

Open VSCode and navigate to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on Mac)

2

Search for "Claude Code for VS Code" by Anthropic

3

Click the Install button to add the extension to your VSCode

Claude Code VSCode Extension Installation

Option 2: CLI Installation

The native installer is the recommended method — it keeps itself updated in the background.

# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

# Verify
claude --version

Other supported methods:

MethodCommandAuto-updates
Native installercurl -fsSL https://claude.ai/install.sh | bashYes
Homebrewbrew install --cask claude-codeNo — brew upgrade claude-code
WinGetwinget install Anthropic.ClaudeCodeNo — winget upgrade Anthropic.ClaudeCode
npmnpm install -g @anthropic-ai/claude-codeYes
apt / dnf / apkSigned Anthropic repositoriesNo — via your normal system upgrade
Diagnose a broken setup with claude doctor. It prints read-only installation and settings diagnostics — install health, settings-file validation errors, and suggested fixes — without starting a session. This is the fastest way to confirm Ask Sage configuration was actually picked up.
Air-gapped and update-controlled environments: native and npm installs auto-update in the background. To pin a fleet to a version you distribute yourself, set DISABLE_AUTOUPDATER to "1" (stops background checks) or DISABLE_UPDATES (blocks manual updates too) in the env block of settings.json. Confirm with claude doctor. Note that updates require reaching Anthropic hosts — plan for this alongside the DoD network configuration below.
Never use sudo npm install -g — it causes permission and security problems. If you hit permission errors, use the native installer instead.

Configuration Methods


Interactive sign-in via Claude Desktop


Choosing a model


Privacy & Data Usage Controls


DoD/DoW Network Configuration


Troubleshooting

Troubleshooting

Issue: "Token is invalid" error

Solutions:

  • Verify your API Key is correct
  • Remove any extra spaces from the token string
Issue: Connection errors

Solutions:

  • Verify the ANTHROPIC_BASE_URL is correct and accessible
  • Verify your Ask Sage API Key is correct
  • Ensure there are no firewall rules blocking the connection
Issue: Certificate errors in DoD/DoW environment

Solutions:

  • Verify certificate path is correct in your configuration
  • Ensure certificate is in PEM format (not DER)
  • Check you have the complete certificate chain
  • Windows users: Use double backslashes (\\) in JSON configuration

Confirm the certificate actually loaded — Claude Code does not validate these paths when it reads them, so a typo only surfaces as a TLS error on a later request. Start a session with claude --debug and look for this line in ~/.claude/debug/<session-id>.txt:

CA certs: Appended extra certificates from NODE_EXTRA_CA_CERTS (/path/to/ca-cert.pem)

A Failed to read or Failed to load line gives the reason instead. The /status command shows an Additional CA cert(s) row, but it prints the configured path without checking that the file loaded — so confirm in the debug log, not in /status.

Note that Claude Code already trusts your operating system certificate store in addition to its bundled Mozilla CA set, so a DoD root installed machine-wide often works with no configuration at all. CLAUDE_CODE_CERT_STORE controls this — it accepts bundled, system, or the default bundled,system.

Issue: mTLS is required by your gateway or proxy

Set the client certificate pair as environment variables — these are read at startup and re-read when settings are applied:

  • CLAUDE_CODE_CLIENT_CERT — client certificate
  • CLAUDE_CODE_CLIENT_KEY — client private key
  • CLAUDE_CODE_CLIENT_KEY_PASSPHRASE — optional, for an encrypted key

To rotate, replace the files at the same paths; Claude Code picks up the replacement in a running session after a connection-level failure. The /status rows mTLS client cert and mTLS client key appear only when the files loaded, so a missing row means the load failed.

Issue: background agents ignore your proxy or CA settings

Background agents run under a per-user supervisor process that outlives your shell and may have been started by a different terminal — so a export in your shell reaches them only by luck. Put proxy, CA, and mTLS variables in the env block of ~/.claude/settings.json or managed settings instead; that is the only configuration guaranteed to reach every background session.


Additional Resources

Documentation & Resources

Have Questions? Reach out to us at support@asksage.ai

Back to top

Copyright © 2026 Ask Sage Inc. All Rights Reserved. Ask Sage is a BigBear.ai company.