# Claude Code

Claude Code works fully with 0bridge: setup, history, resume, agent control and cloud sessions. Level: full. Last checked 2026-10-01.

## Set it up

```
npm install -g 0bridge
0b setup
```

By hand: `claude mcp add --transport http 0bridge https://0bridge.dev/mcp`, then run `/mcp` in Claude Code to sign in. A second Claude Code account (`CLAUDE_CONFIG_DIR=~/.claude-b`) gets the same setup: [Command reference](/docs/cli).

## What works

- **History:** with `0b history on`, sessions are collected, including those from the Claude app's Code tab. `0b history hooks on` adds Stop and SessionEnd hooks to Claude Code's settings so a session uploads when a turn ends, within about 20 seconds, instead of waiting for the 15-minute job. The hooks are silent and never slow a turn down. The same hook also tells the [session board](/docs/sessions) when a prompt starts, when Claude Code is waiting for you and when a turn ends.
- **Resume into Claude Code:** `0b resume 0b:k3f9x2 --tool claude` starts Claude Code with the handoff as its first message. On the machine where the session ran, it offers `claude --resume` with the original session. See [Resume anywhere](/docs/resume).
- **Resume out of Claude Code:** inside Claude Code, say `continue 0b:k3f9x2` and it calls `bridge__resume`. Run `bridge__session_save` to checkpoint a summary and the open items first.
- **Agent control:** `0b agent` starts Claude Code tasks headlessly in their own git worktree and relays permission prompts to you. See [Your agents from your phone](/docs/remote-control).
- **Claude Code on the web:** `0b project cloud` writes the files a cloud session needs. See [Cloud agents](/docs/cloud-agents).

## Remove it

`0b history hooks off` takes the hooks out, and only the ones 0bridge added.
