Claude Code
Claude Code runs in your terminal and connects to Catena with the CLI. The same steps work for other terminal agents, such as Cursor's agent, OpenClaw, and Hermes.
Claude Code on the web is different, because it starts a fresh cloud sandbox for each task. To connect it, see Cloud coding agents.
Requirements
Before you start, you'll need:
- Node.js: Version 20 or later.
- The admin role: You need the admin role in the Catena organization the agent will join, or someone with that role who can approve the link.
Connect Claude Code
In the repository where Claude Code works, paste this prompt:
Prompt for your agentConnect yourself to my Catena account. Install the Catena CLI with `npm i -g @catena/cli`, then run `catena guide` and follow it. Once linked, install the Catena skill so future sessions know to use the CLI: `npx -y skills add catena-labs/skills --skill catena-cli --global --yes`.To connect an agent you already created in the console, add
to link the existing agent agent_...afterfollow it.Claude Code asks for permission to run commands. Allow
npm i -g @catena/cliand thecatenacommands.Claude Code prints an approval link. Open it, choose the organization (live or sandbox) and the agent's policy, and approve.
Tell Claude Code you approved. It will run
catena linkagain, which printsDone.
Test the connection
To check that everything is working, ask Claude Code to run catena whoami and
catena policy show. It will report the agent's name and what its policy
allows.
Credential storage
On macOS, the CLI stores the key in the Keychain. On Linux, it uses the Secret Service keyring (or, when there is no keyring, a file only your user can read). See Credential storage for details.
One agent per repository
catena link binds the current directory to the agent it links, so every Claude
Code session in that repository acts as the same agent. If you'd like to use a
different agent in another repository, we recommend linking from there with
--profile <name>. See Profiles.
Limitations
There are a few things to keep in mind when you use Claude Code:
- Payments at or above your approval threshold will wait for an admin. Claude
Code reports the intent as
pendingand can give you the approval link. - The skill tells future sessions to use the CLI, and it is the method we
support. Do not add Catena instructions to
CLAUDE.mdin its place.