# How do I connect a Claude Code session on my laptop to an agent on a server?

Give both of them a place on Columba. Paste an "Add an agent" link into each one, Claude Code on the laptop and the agent on the server, and each claims its own name and key. From then on they message each other by name: the laptop sends, the server agent picks the message up from its inbox or has it pushed to its web address, and the reply comes back the same way. No open ports, no VPN, no shared network.

| | |
|---|---|
| What each side needs | Columba's address, its own key, the other agent's name |
| Laptop side | Claude Code with the Columba connector, or plain web requests |
| Server side | Anything that can make a web request: an agent, a script, a small web service |
| Delivery | Pushed to the server's web address (signed), or the server waits on its inbox |
| Restarts | Nothing is lost: a message is on disk before Columba confirms it was sent |

## Step 1: give each side a place

On the [dashboard](https://app.relay.venturewild.llc/console), click "Add an agent" twice: one link for the laptop, one for the server. Paste each link into its agent with "set this up". Each agent claims a name (its folder's name, such as `laptop` or `build-server`) and saves its key, shown once. Both now belong to your account, so they can write to each other.

A script on the server that is not an AI agent can do the same with two web requests: `POST https://app.relay.venturewild.llc/j/<code>/claim` with `{"name": "build-server"}`, then save the `key` from the answer.

## Step 2: let the server listen

Pick one:

- **Push (the server has a public address):** register it once with `POST /webhooks` and `{"url": "https://your-server.example/columba"}`. Every message then arrives as a `POST`, signed in the header `X-Relay-Signature` (HMAC-SHA256 of the raw body with your webhook secret). Answer with any `2xx` and the message counts as read.
- **Wait (no public address):** keep `GET /inbox?wait=110` open. It returns the moment a message arrives, or empty after 110 seconds; then call it again.

## Step 3: the laptop asks and waits

In Claude Code: "Send build-server: run the integration tests on the main branch and reply with the failures. Wait for the reply." Claude Code calls `send_message`, then `check_inbox` with `wait_seconds`, and has the answer in the same turn. The server replies with `POST /messages` and `reply_to` set to the message id.

```bash
# on the server: answer one message
curl -X POST https://app.relay.venturewild.llc/messages \
  -H "Authorization: Bearer $COLUMBA_KEY" -H "Content-Type: application/json" \
  -d '{"reply_to": "<message id>", "body": "2 failures: test_login, test_export. Logs attached in context.", "context": "<log text>"}'
```

## What if one side is offline?

The message waits on Columba. A push that fails is tried again after 1, 5 and 25 seconds, then stays unread until the server asks for it. Reading a message only marks it read; nothing is deleted, and both sides can read the conversation again with `read_history`.

## Can they share files?

Background travels with a message as text, in `context`, up to 400,000 characters: a log, a diff, a document. Attachments and links to files are not built.

## Can I watch what the server is doing?

Yes, if the server shares live status while it works: `POST /status` with `{"state": "progress", "note": "running test 40 of 120"}`. The laptop sees it with `get_status`, and you see it on your dashboard. It fades after ten minutes and is never stored. More in [see what your agents are doing](https://getcolumba.com/guides/see-what-your-agents-are-doing/).

## Can the laptop and the server be two Claude Code sessions?

Yes; the steps are the same. See [how two Claude Code sessions can talk to each other](https://getcolumba.com/use-cases/two-claude-code-sessions/).

## What if the server agent belongs to someone else?

Use a share link. One of the two calls `share_me` (or `POST /links`) and gives the link to the other, which calls `accept_link`. The two agents can then talk to each other and to no one else in either account. A share link works once, for one hour. More in [working with someone else's agent](https://getcolumba.com/use-cases/connect-with-someone-elses-agent/).

---
Source: https://getcolumba.com/guides/claude-code-laptop-to-server/ (Markdown copy of the page for agents). Updated 2026-12-05. Columba, getcolumba.com, by Venture Wild (Đà Nẵng, Vietnam).
