Claude Added in 0.9.0
The Claude provider runs Anthropic's Claude Code agent on the relay's machine, through the Claude Agent SDK. OAR starts one worker process per conversation. There is no API key to enter: Claude uses the Claude login of the relay's machine, and you can change that login from the browser.
Claude Cloud runs Claude Code in a sandbox at Anthropic instead of on your machine. It is a separate provider with its own setup. Added in 0.9.18 Claude API runs the same Claude chats on a Claude Console API key instead of your subscription, and a Claude chat can switch between the two.
What you need #
- A Claude login on the machine the relay runs on. The relay stores no Claude
key; the Claude CLI keeps the login, and OAR only drives it. You can log in
from the browser (see The Claude account) or by running
claudeonce on the machine. - The Claude Code CLI (
claude) on that machine, for the browser login and the account row. Claude turns do not need it: they run on the Claude Code build that ships with the Agent SDK. OAR can install the CLI for you, and from then on new sessions use that copy.
The Claude Code CLI row #
At the top of Settings → Providers → Claude a Claude Code CLI row shows whether the CLI is installed, its version, where it is and whether it is up to date. Its buttons depend on the state:
| Button | When | What it does |
|---|---|---|
| Install | No CLI found | Asks you to confirm, naming the command and the folder it writes to, then runs Anthropic's own installer as the relay's user. On Linux and macOS that is curl -fs; on Windows irm https://. |
| Update | CLI found | Runs claude update. |
| Switch to native installer | The CLI was installed with npm into a folder the relay's user cannot write | Runs claude install. The npm copy stays where it is; the native build takes precedence on PATH. |
| Cancel / Dismiss | While an install runs / after it ended | Stops the run / clears the result. |
The install output streams into the panel as Install log. It survives closing the settings and can be watched from another device. Only one install runs at a time on the relay. Nothing you type reaches a shell: the commands are fixed in the relay.
OAR looks for claude on the relay's PATH, then in ~/. and
/. After an install or update it uses the new binary at once, and
remembers it across restarts, so you do not restart the relay. Sessions that
are already running keep the binary they started with.
Switching it on #
Claude is off by default. Open Settings → Providers → Claude. Under Claude SDK:
| Control | Default | What it does |
|---|---|---|
| Enable Claude for New Chat model selection | Off | Makes Claude a choice in New Chat and runs model discovery. It applies as soon as you switch it, without Save Claude settings. |
| Claude model ID | claude- |
The model a Claude conversation starts with. Press Save Claude settings to apply it. |
| Commit attribution | OAR | What commits and pull requests say. See Commit attribution. Needs Save Claude settings too. |
A line under the controls says what state Claude is in. Turning Claude off moves conversations that have not sent a message yet back to the default provider. Conversations that have already started keep Claude.
Models #
Switching Claude on discovers the models the Agent SDK offers and adds their
claude- IDs to the pickers. Use Select Models → Claude SDK to choose
which of them show in the composer; the default model always stays enabled.
Long-context variants such as claude- do not appear as separate
models. They show as a 1M entry in the Context window dropdown of the base
model, in New Chat and in the composer.
A new model comes with an OAR update
Discovery asks the Claude Code build that is bundled with the Agent SDK, so
claude update alone does not make a new Claude model appear. It arrives with
an OAR update.
The Claude account #
Under the CLI row, the account row names the signed-in account and its plan,
for example Account: dev@example., or Not logged in.
Relogin #
- Press Relogin. The relay runs the Claude CLI's login on its machine.
- An Open the Claude login page link appears, with a Copy link button. Open the link on any device and authorize on claude.ai.
- Claude.ai shows a code. Paste it into the field (Paste the code from claude.ai) and press Submit code (or Enter).
- The panel says
Logged in as …. A fresh model discovery runs, so you do not restart the relay.
Cancel abandons the login. A login that nobody finishes ends after 10 minutes. Only one login runs at a time on a relay. It is pushed to every open browser, so you can start it on one device and finish it on another, and closing the settings does not lose it.
The relay holds no Claude secret. The CLI writes the new login into the
Claude configuration folder of the relay's machine (~/., or the folder
in CLAUDE_).
Logout #
Logout opens Log out of Claude, which names the account and says how many Claude workers are running. Confirm with Log out. New Claude turns then fail until you log in again.
Running sessions #
Running Claude sessions keep the previous account until their worker process exits. New sessions use the new account.
Commit attribution #
Claude Code normally adds its own Co- line to the
commits an agent makes, and a line to pull request bodies. OAR lets you choose:
| Choice | Commits | Pull requests |
|---|---|---|
| OAR (default) | End with Co-, with the model's name in the parentheses, for example Claude Fable 5.. |
End with 🤖 Generated with [Open Agent Relay](https://. |
| Vanilla | Claude Code's own lines. | Claude Code's own line. |
| Off | No attribution line. | No attribution line. |
OAR and Off also keep a link to the session out of the commit and pull request text.
Set the choice for the whole relay in Settings → Providers → Claude → Commit attribution. Under the select, an example line shows what commits will say.
Per folder #
The 🧠 context button of a Claude conversation shows Commit attribution for the conversation's folder, with a select: Inherit (provider: …), OAR, Vanilla or Off. A choice here holds for every Claude session in that folder. Inherit goes back to the relay-wide setting.
A change reaches a running session with its next message. Switching to vanilla restarts the session's CLI between turns. Claude Cloud conversations follow the relay-wide setting too. Added in 0.9.18 Claude API chats are Claude sessions and follow the folder's choice like any other. Added in 0.9.17 DeepSeek conversations in the folder follow the folder's choice, with Vanilla read as OAR; their relay-wide setting is on the DeepSeek sub-tab. Other providers are not affected.
Background command limit Added in 0.9.12 #
Settings → Providers → Claude → Claude background command limit sets how long a command Claude runs in the background may take before Claude Code stops it, when Claude does not give the command a timeout of its own. The slider runs from 30 minutes to 8 hours in 30-minute steps; the default is 2 hours. Save Claude settings saves it. Claude can still ask for up to 8 hours for a single command.
- A command Claude runs in the foreground moves to the background after 2 minutes, so the turn goes on while it runs, and shows in the task panel with its console.
- Commands that start with
sleep, and commands of sub-agents, stay in the foreground and may then hold the turn up to the limit. - Claude is told the limit, to write the full output of a long command to a
log file instead of piping it into
tailorhead, and to start a run that must survive a session restart detached withnohup. - The CLI reads the limit when it starts: a change applies to Claude sessions started after you save; a running session keeps its limit until it restarts. Claude Cloud chats are not affected; Added in 0.9.17 DeepSeek and Added in 0.9.18 Claude API chats, which run Claude Code too, use the same limit.
OAR passes the limit to Claude Code as BASH_, with
BASH_ at 8 hours and CLAUDE_
at 2 minutes. These three are set for every Claude session OAR starts, so the
same variables in the relay's environment have no effect.
Effort and thinking #
Reasoning effort #
The reasoning effort picker is per message: you can change it between turns.
It offers none and the levels the model reports (low, medium, high,
xhigh, max). Ultracode appears on models that support xhigh. It
means xhigh effort together with multi-agent workflow orchestration, and
uses much more tokens.
Context window #
For models that have a 1M variant, the Context window dropdown offers the
model's default window (shown as —, since the SDK's catalog carries no
figure) and 1. A model that ships only as a 1M variant offers just that.
Thinking #
The 🧠 context button also holds two Claude-only controls, set per conversation:
| Control | Choices | Default |
|---|---|---|
| Thinking | On, Off | On |
| Thinking text | Summarized, Hidden | Summarized |
Turning thinking on, and changing the text, apply on the next message. Turning thinking off applies to the next CLI session. Hidden only hides the text; the model still thinks and the tokens still count. Off is the control that saves tokens.
What works especially well on Claude #
- Steering. A message you send during a running turn goes into that turn; the send button reads Steer. See Turns and the queue and While a turn runs.
- Modes. plan uses the SDK's own plan mode and ends with a Plan ready board from Claude's plan tool. See Relay modes.
- Question cards. Claude's
Askbecomes a card, multi-select included. See ask_user.User Question - Background tasks and sub-agents. Backgrounded commands, sub-agents, monitors and workflows outlive the reply that started them and show in the composer's task panel. A sub-agent's title opens its whole record. Only a backgrounded sub-agent can be stopped on its own; one running inside the current turn stops with the turn. Settings → General → Background task timeout (default 4 h) limits how long background tasks alone keep a session running.
- Exact context breakdown. The 🧠 button shows the categories the SDK reports.
- Automatic compaction. Claude compacts a long session by itself. The 🧠 modal has an Auto-compact window slider: Auto, 100k, 150k, 200k, 300k, 500k or 1M. See Compacting a conversation.
- Usage-limit pause. A turn that hits the subscription's usage limit is paused and carries on after the reset. See When a usage limit is reached.
- Session continuity. The SDK's session id is stored, so a conversation resumes after its worker restarts.
- Attachments. Images up to 5 MB are sent inline. Larger images and other files are passed as paths for Claude to read.
Claude turns have no usage line under the reply. Claude's plan limits are in Check Usage.
Where the session lives #
In the file browser, the Session root button (🕵️) opens the session's own
folder in the Agent SDK's project area, inside ~/. (or inside
CLAUDE_). The transcript is the . file next to that folder.
The folder is created only when the session has sub-agent or tool-result
files, so it can be empty for a young conversation. Deleting a conversation
deletes its transcript.
Environment variables #
Set these in the environment the relay starts in.
| Variable | What it does |
|---|---|
CLAUDE_ |
The Claude configuration folder instead of ~/.: the login, and where session folders are looked up. |
CLAUDE_ |
The Claude Code binary the workers use instead of the build bundled with the Agent SDK. An install or update from the panel sets it for you. |
CLAUDE_ |
Overrides the auto-compact window. The line under the slider then names it as the source. Read by Claude Code itself; where sessions run under tmux, setting it for the relay does not reach it (see which variables reach the agents). |
BASH_, BASH_, CLAUDE_ |
Added in 0.9.12 Not read from the relay's environment: OAR sets them for every Claude session from the background command limit. |
CLAUDE_ |
A login token instead of the CLI's login file, for Claude Cloud and for local Claude chats, whose CLI prefers it to the login file. Added in 0.9.17 Only Claude and Claude Cloud workers get it, under tmux through a file only the relay's user can read; the workers of other providers, DeepSeek's included, never do. |
ANTHROPIC_, ANTHROPIC_ |
Added in 0.9.17 Not passed to the workers. A Claude chat runs on the Claude login, never on a key in the relay's environment; before 0.9.17 Claude Code preferred such a key to the login. A Claude API chat runs on the key saved in Settings → Providers → Claude API, never on these. |
Added in 0.9.18 A subscription chat never runs on an API key. Claude Code
takes an API key over your Claude login when one of its own settings hands it
one: env. in ~/. or in the chat
folder's ., an api, or a Console login. Such
a chat used to run on that key and bill its owner. Now the turn stops when
Claude Code starts, with a note that names the source and the setting to
remove, and the code relay.. Claude Code sends its
first model request a moment after that start, so at most one model request
can go out on the key first. To run a chat on an API key, use Claude
API and its billing switch.
Troubleshooting #
| Problem | What to do |
|---|---|
| Claude is missing from New Chat | Switch on Enable Claude for New Chat model selection in Settings → Providers → Claude. |
| The CLI row says Not installed, or the account row cannot read the account | The browser login and account row need claude on the relay's machine. Press Install, or install it yourself and reopen the settings. |
Not logged in, or a reply says Claude cannot authenticate |
Press Claude settings on the failed reply, then Relogin (or run claude on the machine). Then send the message again. |
| The login expired | Same as above. A running session keeps its old token until its worker exits; send the message again after logging in. |
| The reply points at billing, subscription or the organization | Check the account the panel names: its subscription, its payment method, and whether the organization allows Claude Code. Relogin signs in to another account. |
| A turn paused at a usage limit | Wait for the reset, or use Resume now or Cancel on the banner. See When a usage limit is reached. |
| A new model is not in the picker | Models come from the SDK's bundled Claude Code build; they arrive with an OAR update, not with claude update. |
Added in 0.9.18 Claude Code took an API key for this subscription turn (source "…"), so the turn was stopped (relay.) |
Remove ANTHROPIC_ from the env of Claude Code's settings (~/., or the folder's .), remove an api, or sign the Console login out, then send the message again. To run the chat on the key saved in Settings, switch it to API key. |
| Relogin fails on Windows | The login flow is built for Linux and macOS; on Windows it is best effort. Run claude in a terminal instead. |