ANTHROPIC_BASE_URL=http://127.0.0.1:7171,
with zero code changes; POST /v1/messages is forwarded after passing through the TELOS pipeline, and
every other path is passed through unchanged.
Starting the gateway
telos init already starts the gateway in the background automatically. You can also manage it
manually:
~/.telos/gateway.json and the log in
~/.telos/gateway.log, which prints:
The old
telos proxy ... (foreground, blocking) is kept as a hidden alias, fully flag-compatible.Default behavior
- The gateway accepts all Anthropic protocol paths;
/v1/messagesis rewritten by TELOS, everything else is passed through unchanged. - Non-strict by default: on a TELOS failure it degrades to passthrough.
--strictchanges this to return a 500 instead. - It embeds the dashboards at
/__telos/dashboard,/__telos/developer, and/__telos/developer.json.
Harness auto-detection
The gateway automatically determines which harness each request belongs to — no manual specification needed. Beyond the main conversation, Claude Code also sends auxiliary requests via Haiku (conversation-title generation, new-topic detection). These have no tools and no<system-reminder>
tag, so the gateway identifies them via the HTTP User-Agent header (claude-cli/...) and remembers
the result per client, so auxiliary requests are also correctly attributed and won’t be shown as
openclaw. See Harness integration for the full detection order.
session-id derivation
Inside the proxy, an LRU_SessionRegistry (default cap 10000) holds one BridgeSessionState per
session. The session_id is derived, in priority order:
- the
x-telos-sessionHTTP header (explicit override), metadata.user_id(an Anthropic SDK built-in field),blake2b(api_key + system + tools + messages[0])→telos-<16 hex>.
messages[]) map to the
same session_id, a different initial prompt maps to a different one, and two users with different
API keys never collide.
Integrating clients
- Claude Code
- Codex
- OpenClaw / Hermes
- Generic
ANTHROPIC_BASE_URL into the env field of ~/.claude/settings.json (atomic write, with
a .telos.bak backup and a __telos_installed marker). Does not touch the npm package or PATH,
and survives npm update.Undo / inspect
Full CLI reference
Every flag for
telos gateway, telos init, telos mode, and more.