# Connect Claude Code

> Connect Claude Code to Castle from the app or from Terminal, restart it, check the connection, and remove it again. One press, no new app.

By the end of this page Claude Code will be connected to Castle, and you will know how to check it and how to remove it.

Claude Code needs to be installed and signed in first. If it is not, Castle says so and gives you a command to run in Terminal. Press **Check Again** afterwards.

## In the app

1. Open **Settings › Agents**, or press the button on the first window's agent door.
2. Castle says when it finds Claude Code on your Mac. Press **Connect Claude Code**.
3. To see what changes first, press **Show what changes**. Castle adds its tools and a short guide to Claude Code, and a `castle` command to your terminal. You can remove them in Settings.
4. Restart Claude Code if it is open.

<figure class="doc-shot" style="max-width:604px"><img class="ld" src="https://castle.cx/assets/docs/docs-settings-agents-light.webp" width="1208" height="396" loading="lazy" alt="The top of Castle's Settings, Agents: the Allow agents switch, on, and Connect your agent with a Connect button"><img class="ln" src="https://castle.cx/assets/docs/docs-settings-agents-dark.webp" width="1208" height="396" loading="lazy" alt="The top of Castle's Settings, Agents: the Allow agents switch, on, and Connect your agent with a Connect button, in the dark appearance"><figcaption>Settings › Agents, top part. From Castle’s design prototype. The finished app may look different.</figcaption></figure>

Castle writes to your own Claude Code settings even when Castle was opened from an agent's terminal.

## In Terminal

```
castle integrate claude
```

Then restart Claude Code.

## Check it

- In Settings › Agents, Claude Code shows **Added**, with a **Remove** button. After you connect again, the agent line in the sidebar updates by itself, and **Check Again** looks at once.
- In Terminal, `castle integrate` lists each agent app it finds and whether Castle is connected.
- In Claude Code, ask it to use Castle. A first prompt is on [Your agent's first task](https://castle.cx/docs/get-started/your-agents-first-task.md).

## Remove it

Press **Remove** beside Claude Code in Settings › Agents.

## If it does not work

- Restart Claude Code.
- Make sure **Allow agents** is on, and that the device is not set to **Can't use**. See [What agents may do](https://castle.cx/docs/agents/what-agents-may-do.md).
- [Claude Code or Codex is not connected](https://castle.cx/docs/help/agent-is-not-connected.md) has more.
- [Get support](https://castle.cx/docs/help/get-support.md).

## Next

[What agents may do](https://castle.cx/docs/agents/what-agents-may-do.md).

---
Section: Agents · Last updated: 2026-11-20 · Source: https://castle.cx/docs/agents/connect-claude-code
