Guides
Work with AI agents
Run Claude, Codex, and Cursor in your workspace with your own subscription, an API key, or CoDev credits.
CoDev runs Codex, Claude, and Cursor inside your workspace. Agents work on the same files, terminals, and running app as your team, and everyone sees them work.
Connect an agent
Each person connects their own AI accounts. A connection is saved to your account and works in all your workspaces; nobody else can use it. Open Settings → AI providers in a workspace, or Settings → AI Provider Accounts, and use Other ways to connect:
- Connect from a terminal with the CoDev CLI:
codev login, thencodev codex-auth,codev claude-auth, orcodev cursor-authto connect your ChatGPT, Claude, or Cursor subscription. - Use an API key instead: paste a key and choose Save key. You can Replace key or Revoke it later.
Signing in to a subscription in the browser from CoDev isn't available; connect it from a terminal instead.
Use CoDev credits instead
Codex and Claude can run on CoDev's account instead, charged to CoDev credits at the provider's price plus 30%. Cursor can't run on credits. Each agent has two switches under a workspace's Settings → AI providers:
- Use my CoDev credits for Claude (or Codex) charges your own credits, or your team's on Teams, in every workspace, including other people's. Nobody has to approve it. It's also under Settings → AI Provider Accounts.
- Use the owner's credits for Claude (or Codex) charges the workspace owner's credits, in that workspace only. It appears only while the owner has Pay for collaborators' Claude and Codex turns on in the workspace's Settings → General, and turning that off ends it.
The one that applies is used instead of your own key for that agent. An empty chat offers every way at once: your own key, Use my CoDev credits, and Use the owner's credits where the owner offers it. Either credits button turns credits on for both Claude and Codex, except an agent you already run on your own account. Or choose Copy setup prompt and paste it into Claude Code, Codex, or Cursor on your computer: it connects your agent to CoDev, and it then works on the workspace from your computer on your own plan.
See Credits and plans.
Choose an agent and model
The chip in the message box shows the agent and its model. Choose it to pick the Harness (Codex, Claude or Cursor) and the Model; Effort shows the agent's default, and Manage agents opens settings to connect another. Codex is the default. Models come from your own account; if the workspace can't run a model you picked yet, the turn uses the closest one and tells you.
While an agent is working you can change its model; the change applies to your next message.
Permission levels
Agents can ask CoDev to do things in the workspace, such as switching branches, running a command in a terminal, or opening a pull request. The permission chip in the message box sets what happens:
| Level | What runs without asking |
|---|---|
| Ask | Nothing: every agent request waits for your click. |
| Auto-accept | Switching worktrees and opening or creating branches. |
| Bypass | Everything, including terminal commands, invites, merges, pushes, and pull requests. |
Navigation, like opening a file, showing changes, opening the terminal or a preview, or renaming the chat, never needs a click.
Agent requests
When an agent asks to do something, a card labeled Agent request appears in the chat with a button such as Open branch, Run in terminal, Merge into main, Push, or Open pull request. Choose it to go ahead, or dismiss it. The agent hears the result and carries on. Only owners and editors can act on requests.
Requests are limited to safe forms: invites only add new members, and Run in terminal opens a new terminal of your own.
In the message box
- Mention with @: a code selection, terminal output, files and folders, other chats, or another agent for just this message.
- Slash commands:
/plan,/ask,/goal,/review,/init, plus workspace commands like/previewand/pr. See Shortcuts and commands. - Attachments: up to 5 files, 1 MB each.
- Follow-ups: press
Enterwhile the agent is working to queue one follow-up. - Stop: choose Stop or press
Esc. Replies are saved even if you close the tab.
On any message you can Copy message, Regenerate reply, Edit and resend, or Fork chat from here.
Goals
Use /goal to give a chat a goal the agent keeps working toward. The goal bar offers Continue, Mark done, and Clear. Turn on Keep going and the agent continues on its own for up to 5 turns, with a 5-second countdown you can stop.
Find an earlier chat
The sidebar lists Pinned chats, My chats (newest first; View all shows the rest) and Team: one row per teammate, with a dot while they're online, that opens onto the chats they started. Each chat shows its agent and when it last changed, and a bar marks one an agent is working in. Chats you've opened stay as tabs above the conversation; + starts a new one.
Type in Search chats at the top of the sidebar. Chats whose title, starter, or agent match appear first. Below them, In messages lists prompts and agent replies that contain what you typed, newest first, each marked Prompt or Reply. Choose one to open its chat. Every member, viewers too, can search every chat in the workspace.
Run a cloud agent from your own tools
Agents in a workspace are cloud agents: they run on the workspace machine, not your computer, and your team sees their chats. Once you've chosen how agents run, a new chat shows two ways to start one: type in its message box, or choose Copy prompt under Or from your own tools and paste it into Claude Code, Codex, or Cursor on your computer. Your agent asks what the task is, starts a cloud agent in the workspace, and tells you what it did. Your agent needs CoDev connected first; see Claude Code and Codex.
Running several agents
Each agent works in a worktree, and CoDev never runs two in the same one. To run agents in parallel, give each its own worktree. See Parallel worktrees.
Codex on your ChatGPT sign-in runs one turn at a time, wherever you use it. When it's busy, a message you choose to wait with, or one your own Claude Code or Codex sends, waits in line and starts when the running turn finishes. Codex on an API key or CoDev credits, and Claude, run side by side.
What agents are told
Every turn starts with the same ground rules: work inside the workspace folder (files there survive when the workspace sleeps), never print secret values, and commit with Git but never push. Pushing goes through CoDev, as you; see Git, GitHub, and pull requests.
Agents get the names of your environment variables, never the values.
Bring a session with you
- Import a local session: bring a Codex or Claude Code conversation from your own machine into the workspace (
/import). - Start a chat from an issue: start a chat from one of your repository's GitHub issues.