# ADR 0003: Account-Scoped Claudex Proxy

Audience: AI coding agents first.

## Status

Accepted.

## Decision

`claudex` MUST run one loopback-only `claude-code-proxy` child per GPT-5.6 invocation. It MUST derive proxy credentials from Systray AI current default Codex account, store bridge state inside that account, and reconcile token rotation atomically.

`claudex` MUST route Fable, Opus, and Sonnet directly through selected native Claude account `CLAUDE_CONFIG_DIR`; it MUST NOT start proxy or access Codex credentials. GPT sessions default upstream model to `gpt-5.6-sol`, accept explicit Sol/Terra/Luna selection, and use proxy priority service tier. Native and proxy sessions MUST remain isolated.

## Consequences

- Default-account changes apply on next launch.
- Concurrent accounts cannot share proxy credentials or ports.
- Wrapper owns proxy cleanup and credential-shape conversion.
- Native Codex auth remains authoritative when credentials have equal lineage.
