claude-bridge

A subscription-safe bridge that lets a primary Claude Code (Opus 4.8, on Pro/Max) session drive a secondary Claude agent running a different model via its own ANTHROPIC_BASE_URL — without ever putting a proxy on the primary session.

Sibling of crush-bridge (which drives a headless Crush worker on GX10 DeepSeek). claude-bridge keeps the worker a real Claude Code process, so it inherits CLAUDE.md, hooks, skills, and MCP — just pointed at a cheaper/local model.

Leading approach — AgentAPI

coder/agentapi wraps the Claude Code CLI as an HTTP server (POST /message, GET /messages, GET /events SSE, GET /status). The worker's model is whatever env its wrapped claude process launches with — so the worker server runs with ANTHROPIC_BASE_URL=https://ollama.ltms.dev + a bearer token, and the primary Opus session talks to it over HTTP.

  Opus (Claude Code, subscription, env CLEAN)
        │  HTTP  POST /message ─┐
        ▼                       ▼
  agentapi server  ──launches──►  claude  (ANTHROPIC_BASE_URL=ollama.ltms.dev, worker model)
        ▲  GET /events (SSE) ◄──┘
  • Subscription boundary: the primary never sets ANTHROPIC_BASE_URL (stays on Pro/Max). Only the secondary process is off-subscription.
  • Different model per process sidesteps Claude Code's lack of per-subagent provider routing — the worker isn't a subagent, it's its own configured process.

Docs

Full design, setup, and operations live in the wiki, vendored here as a submodule under wiki/:

git clone --recurse-submodules ssh://git@git.ltms.dev:2224/lms/claude-bridge.git
# or, after a plain clone:
git submodule update --init

Edit docs in wiki/, then cd wiki && git commit && git push to publish them to the Gitea wiki.

Status

🟡 Planning — AgentAPI selected as the primary approach (2026-07-08).

S
Description
No description provided
Readme 16 MiB
2026-08-10 15:58:06 +02:00
Languages
Java 94%
Shell 5.1%
Python 0.9%