DocsCoding agents

Connect your coding agent

Route Claude Code, Codex or OpenCode through condense. All three reach the same proxy, and only the wiring differs.

Agent prompt

Help me run my coding agent through dense, the condense CLI. Run dense status to check that dense is installed and signed in. token: present means I am signed in. If dense is missing, follow https://condense.chat/docs/getting-started/ first. If token is missing, run dense login. Check which of Claude Code (claude), Codex (codex) and OpenCode (opencode) are installed. Ask which one I want to use if more than one is available, or if I use another agent. Do not install or choose an agent without my input. Give me the command to start it in this project: dense claude, dense codex or dense opencode. If an interactive session needs a separate terminal, tell me to run it there. Ask me to send one short message in that session, then ask me to check that the request appears in the condense dashboard at https://helm.condense.chat. If it does not appear, troubleshoot the local setup and show me what you find. Do not change this project's code or my provider credentials, and do not claim success until a request appears.

Prerequisites

  • The dense CLI, installed and logged in. See Getting started.
  • The agent itself. dense routes the agents you already have.

Choose your agent

Claude Code runs through the dense binary itself. Codex and OpenCode point at the matching dialect with a one-time config and send the condense key in X-Condense-Auth-Token.

AgentWiringHow
Claude Codedense binarydense claude, or dense persist and keep typing claude.
CodexOne-time configPoint ~/.codex/config.toml at the OpenAI Responses dialect. dense codex will automate this.
OpenCodeOne-time configPoint the provider baseURL at the matching dialect in opencode.json.

Claude Code

Claude Code needs no config. Launch it through dense, and it starts with the condense base URL and credentials injected:

bashdense claude <args>

To keep typing claude, put a shim ahead of it on your PATH so the bare command routes through condense:

bashdense persist

Your existing ANTHROPIC_API_KEY forwards through as the upstream key.

Codex

Codex speaks the Responses API, which condense serves at /openai/v1/responses.

  1. Add condense as a model provider

    Define condense as a model provider and select it:

    toml# ~/.codex/config.toml
    model_provider = "condense"
    
    [model_providers.condense]
    name = "condense"
    base_url = "https://api.condense.chat/openai/v1"
    env_key = "OPENAI_API_KEY"
    wire_api = "responses"
    env_http_headers = { "X-Condense-Auth-Token" = "CONDENSE_AUTH_TOKEN" }
  2. Export your keys

    Export CONDENSE_AUTH_TOKEN=ck_api_… alongside your OPENAI_API_KEY.

Note: Requests authenticated with a ChatGPT login instead of an sk- key are detected and forwarded to the ChatGPT Codex backend automatically.

OpenCode

OpenCode takes a per-provider baseURL and headers. Point the provider you use at the matching condense dialect:

json{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://api.condense.chat/anthropic/v1",
        "headers": {
          "X-Condense-Auth-Token": "{env:CONDENSE_AUTH_TOKEN}"
        }
      }
    }
  }
}

For OpenAI models, set the openai provider's baseURL to https://api.condense.chat/openai/v1 the same way.

Next steps

  • dense CLI: look up every command and how dense wraps your agent.
  • API reference: see the base URL, authentication, per-request headers and error shapes.