# Harnesses

> Use Claude Code, Codex, and Pi Agent in Cloudroom with your own subscriptions and model accounts.

Source: https://www.cloudroom.dev/docs/harnesses

A harness is the coding agent that does the work. Cloudroom runs it and saves its history. The harness keeps its own agent loop, tools, and model calls.

## Supported harnesses

- **Claude Code:** Anthropic's coding agent. Local and Cloud.
- **Codex:** OpenAI's coding agent. Local and Cloud.
- **Pi Agent:** an open-source coding agent that works with many model providers. Local and Cloud.
- **Cursor CLI:** in testing.

## Who does what

```mermaid
flowchart TB
  subgraph cloudroom [Cloudroom]
    a[Starts and stops agents]
    b[Queues your messages]
    c[Saves and replays history]
    d[Recovers after restarts]
  end
  subgraph harness [Harness]
    e[Agent loop and tools]
    f[Model calls]
    g[Retries and compaction]
  end
  cloudroom --> harness
  harness --> provider[(Your model provider)]
```

## Your subscriptions, no markup

Each harness signs in with your own account and calls its provider directly. Cloudroom never sits between your agent and the model, and never bills you for tokens.

## Connect Claude Code

1. Click **Connect Claude**. It appears next to the harness tabs in the model picker and in **Settings → Providers**.
2. **Local:** sign in on your Mac and finish in the browser.
3. **Cloud:** approve in the browser, then paste Claude's one-time code into the panel. Never paste it into the chat.

> **Note:** On Cloud threads, Claude Code supports queued messages, Stop, compaction, and rewind. Live steering and Fast mode are not available there.

## Connect Codex

After you sign in to Cloudroom, the app copies your existing Codex login from your Mac into the cloud and checks it. If there is none, **Connect Codex** opens OpenAI's official sign-in. You can reopen it in **Settings → Machines → Cloudroom account → Codex**.

## Connect Pi Agent

Pi works with many providers. Pick a model as `provider/model`, for example `openai-codex/gpt-6-astra`. Sign in to that provider for Pi once. Pi's login is separate from Codex and Claude.

## If a start fails

If a harness is not connected, Cloudroom keeps your first message. Connect the harness, then click **Retry start**. Nothing is lost, and running threads are not affected.

```mermaid
sequenceDiagram
  participant You
  participant App as Cloudroom
  participant H as Harness
  You->>App: Send a task
  App->>H: Start
  H-->>App: Not signed in
  App-->>You: Keeps your message, shows Connect
  You->>App: Connect, then Retry start
  App->>H: Start again
  H-->>You: Replies stream in
```
