# Claude Code, Codex & Copilot Subscriptions

How to run Agenvoy on an existing subscription instead of an API key, after the quickstart works.

When the free tier stops being enough, the next step is not another pay-per-token key — it is a subscription you may already be paying for. These four are the first choice for a second, fall-back model: the cost is already fixed monthly, so an agent that takes a few extra turns doesn't move the bill.

| Provider | Billed against | Where it lives in the menu |
|---|---|---|
| Codex | Your ChatGPT / Codex subscription | **OAuth** tab → `OpenAI Codex` |
| Grok (xAI) | Your xAI subscription | **OAuth** tab → `Grok (xAI)` |
| GitHub Copilot | Your GitHub Copilot subscription | **OAuth** tab → `GitHub Copilot` |
| Claude Code | Your Claude subscription, through the local `claude` CLI | **OAuth** tab → `Claude Code` (shown only when enabled at startup) |

None of them takes an API key. Codex and Grok open a browser authorization page; Copilot uses a device-code flow. Either way the token lands in the OS keychain like any other credential. Claude Code has no login of its own: it runs the `claude` CLI you have already installed and signed in, so it must be switched on when Agenvoy starts.

## Add Codex

| Step | What you do |
|---|---|
| 1 | `/model` → **add** |
| 2 | The picker opens on the **OAuth** tab (←/→ switches tabs) |
| 3 | Choose **`OpenAI Codex`** — not `OpenAI` on the **API Key** tab, which is pay per token. Before v1.0.22 this was OpenAI → *OpenAI  method* → `Codex    subscription` |
| 4 | The OAuth popup opens and your browser goes to the authorization page once it is ready (**Enter** re-opens it). Sign in and approve — the flow has a 15-minute window |
| 5 | Back in the TUI, pick a model from the list your subscription exposes |

## Add Grok (xAI)

| Step | What you do |
|---|---|
| 1 | `/model` → **add** |
| 2 | Stay on the **OAuth** tab |
| 3 | Choose **`Grok (xAI)`** |
| 4 | Same browser OAuth flow as Codex |
| 5 | Pick a model |

## Add GitHub Copilot

| Step | What you do |
|---|---|
| 1 | `/model` → **add** |
| 2 | Stay on the **OAuth** tab |
| 3 | Choose **`GitHub Copilot`** |
| 4 | The popup shows a verification URL and a user code; press **Enter** to open that page in the browser, enter the code and approve. Same 15-minute window |
| 5 | Pick a model from the ones your Copilot plan offers |

## Add Claude Code

| Step | What you do |
|---|---|
| 1 | Install the `claude` CLI and sign in to it with your Claude account; it must be on `PATH` |
| 2 | `agen stop`, then start with `agen --enable-claude-code`. The flag is refused while the daemon is running. A TUI started later without the flag follows the daemon's setting |
| 3 | `/model` → **add**, stay on the **OAuth** tab and choose **`Claude Code`** — the row is hidden until step 2 is done and the binary is found |
| 4 | No browser step. Pick a model from the list the `claude` CLI reports for your subscription |

Details such as caching and session reuse are on [Claude Code Provider](/docs/providers-claude-code).

> Already authenticated once with Codex, Grok or Copilot? The flow asks `<Provider> token exists  re-login?` first. **`No   keep existing`** reuses the stored token and jumps straight to the model list — pick `Yes  re-authenticate` only when switching accounts.

With more than one model registered, **Shift+W** / **Shift+S** cycles the session model from the TUI (`auto` lets the dispatcher pick), and `/model dispatch` / `/model summary` set the dispatcher and summary models explicitly.
