Setting up Claude Code
Claude Code is π° Camelot AI's default Agent CLI, and the only one that's fully integrated and tested today β start here unless you already know you need Codex.
1. Get an API key
Either of these works:
- Anthropic Console API key β an
sk-ant-...key from the Anthropic Console. - Claude Code OAuth token β if you're on a Claude subscription plan
that supports the CLI, run
claude setup-tokenlocally and copy the resultingsk-ant-oat...token. This is billed against your subscription instead of pay-as-you-go API usage.
Camelot detects which one you pasted by its prefix, so either format just works β see how the key reaches the runner below.
2. Add it as a Credential
Go to /profile (any signed-in user, not admin-only) and add a
Credential:
- Kind:
claude_api_key - Name: anything memorable, e.g.
anthropic - Value: the key or token from step 1
Credentials are encrypted at rest and shipped securely to the runner container that executes your tasks.
Why either key format "just works"
The claude_api_key credential is mapped to an environment variable
before the runner starts:
- A plain
sk-ant-...API key becomesANTHROPIC_API_KEY. - An
sk-ant-oat...OAuth token becomesCLAUDE_CODE_OAUTH_TOKENinstead, withANTHROPIC_API_KEYexplicitly cleared so a stale key baked into the runner image can't take precedence.
You don't need to pick which env var to use β pasting either value into
the same claude_api_key credential routes it correctly.
3. Pick Claude Code on a task
When creating a task on the board, the CLI Agent dropdown lets you choose which Agent CLI template runs it. Pick Claude Code β it's pre-seeded, so there's nothing to configure per-project beyond having the credential from step 2.
That credential is a hard prerequisite, not a suggestion: until the
claude_api_key from step 2 exists, Claude Code β API key absent
is greyed out in the dropdown and the form refuses the pick, rather
than dispatching a run that would fail with a bare 401 minutes later
inside the runner.
The board also needs somewhere to run the task: with no project at
all, / sends you to /projects instead of opening the form.
4. Model discovery
The Model dropdown is resolved live, per user: Camelot calls
GET https://api.anthropic.com/v1/models with the credential that
will actually run the task and offers the claude-* ids that come
back. No tokens are billed, and either key format works β an
sk-ant-api⦠key goes on x-api-key, an sk-ant-oat⦠OAuth token on
Authorization: Bearer, the same split the runner uses.
Whose key is used depends on where you are:
- the New Task modal uses yours β you become the task's creator;
- an existing task page uses the creator's, even when somebody else is looking at it, because the runner mounts the creator's key.
Each answer is cached for an hour (a minute, if the call failed), keyed to the user and to the key itself, so rotating or deleting the credential takes effect immediately.
When discovery can't answer β no key stored, the probe disabled,
Anthropic unreachable or refusing the key β the dropdown falls back to
the template's pinned available_models. Nothing about the page
changes; you just see the offline list.
5. Admin: reviewing the template
Workspace admins can review or tune the Claude Code template at
/agents (admin-only). The seeded defaults β executable claude,
models claude-opus-5 / claude-sonnet-5 /
claude-haiku-4-5-20251001, default claude-sonnet-5 β rarely need
touching; those models are now the offline fallback for the dropdown
rather than the whole story. Model discovery probe holds the JSON
that drives discovery (clear it to {} to turn discovery off), and the
per-row Check models action shows what your own key is entitled to,
with Pin these to copy that into the fallback list. Nothing
rewrites available_models automatically.
6. Self-hosted: runner image
- Docker / Swarm backends run Claude Code inside the project's
runner container. The prebuilt
ghcr.io/t0ha/camelot-runner-claude:latestimage already has it installed vianpm install -g @anthropic-ai/claude-code. - Local dev (
LocalPortbackend) runs the CLI directly on the host running Camelot instead of in a container, soclaudemust be installed and onPATHthere too.
Troubleshooting
- 401 / auth errors β usually means the wrong credential kind was
used (double-check it's
claude_api_key, notopenai_api_key) or the key/token has expired. - Task pauses instead of erroring β Camelot recognizes a provider usage-limit rejection and pauses the task (and any other queued task on the same credential) instead of retrying or erroring. It resumes automatically once the limit resets, or via "Resume now" on the task.
See also: Setting up Codex Β· Get Started with Camelot Cloud