Claude Code Inkbox Bridge
Give your Claude Code agent its own Inkbox identity:
a mailbox, iMessage, a phone number for calls and SMS, and an internet address.
Step away from the keyboard and keep working with it from anywhere.
Slack · Email · Calls · SMS / MMS · iMessage · Tunnel
Prerequisites
- Claude Code installed and logged in. The bridge drives a real Claude Code session, so the
claude CLI has to be on the machine and authenticated — install it (claude.com/claude-code), then either sign in with a Claude Pro/Max subscription or set ANTHROPIC_API_KEY. inkbox-claude doctor checks for it.
- Python 3.11+. The installer finds one and builds the bridge its own venv.
- macOS or Linux. Boot persistence uses a systemd user unit on Linux and a launchd agent on macOS.
- An Inkbox agent — nothing to set up in advance; the setup wizard self-signs up for you (or takes an existing API key).
Get started — one command
This finds a Python 3.11+, installs the bridge in its own venv, puts inkbox-claude on your PATH, and runs the setup wizard:
curl -fsSL https://raw.githubusercontent.com/inkbox-ai/claude-code-plugin/main/install.sh | bash
That's the whole setup. The wizard creates a fresh Inkbox agent for you (or takes an existing API key), connects iMessage, provisions a dedicated phone number, mints a webhook signing key, picks the project directory Claude works in, and offers to keep the bridge running on every boot. When it finishes, text/email/call your agent and it answers from a real Claude Code session.
The one thing to have ready: be logged into Claude — a Claude Pro/Max subscription (via the Claude Code app/CLI) or ANTHROPIC_API_KEY set. The installer checks this and warns if it's missing.
Flags: --start (launch the background gateway when done), --no-setup (install only). From a local checkout, run ./install.sh. Re-running is safe.
Bootstrap an existing identity without prompts
For unattended agent setup, keep the identity handle, base URL, and API key supplied by the human who assigned the identity. Do not create a replacement identity. First download the installer once, inspect the exact file that will run, execute that same file with setup disabled, and remove it even if a step fails:
(
set -euo pipefail
installer="$(mktemp)"
trap 'rm -f "$installer"' EXIT
curl -fsSL https://raw.githubusercontent.com/inkbox-ai/claude-code-plugin/main/install.sh -o "$installer"
cat "$installer"
bash "$installer" --no-setup
)
Stop if the downloaded script contains anything unexpected. Once the human-provided credential is available as the transient INKBOX_API_KEY environment variable, run the non-interactive bootstrap:
inkbox-claude bootstrap --identity '<handle>' --base-url '<url>' --project-dir "$PWD" \
--voice-ai --rotate-signing-key --start-gateway
unset INKBOX_API_KEY
Keep the API key out of command-line arguments, source control, project instructions, and other persistent text. Supply it through a private channel, expose it only to the bootstrap process, and unset the transient environment variable afterward. Bootstrap stores the resulting agent-scoped configuration in the bridge's private local configuration.
bootstrap validates that the key can access the requested existing identity, scopes down an admin key before saving it, preserves existing Voice AI settings, and starts or restarts the detached gateway. Signing-key replacement is explicit because it transfers verified webhook delivery away from any gateway using the previous key. The command prints a secret-redacted JSON result and is safe to resume.
configured: continue to verification.
requires_human: show the human every entry in human_actions, wait for them to complete the requested action, then rerun the exact same bootstrap command. Keep using the assigned handle; do not create another identity.
error: use the JSON error and inkbox-claude doctor output to diagnose the failed prerequisite or configuration, correct it, then rerun the exact same bootstrap command. Partial progress is preserved across retries.
Check it any time:
inkbox-claude doctor # config, SDKs, claude CLI, identity reachability
inkbox-claude status # is the background gateway up? where are the logs?
What it does
you (phone) ── SMS / iMessage / email / call ──▶ Inkbox ──▶ tunnel ──▶ bridge
│
▼
Claude Code session
(full tool access in
your project dir)
Text, iMessage, email, or call your agent's Inkbox number. Each remote party gets one Claude Code session spanning every channel — text it on the walk home, then email it details, same conversation.
Claude Code runs with full tool access in CLAUDE_PROJECT_DIR. It reads, searches, and browses freely; anything risky (running commands, editing files) is escalated to you as a text:
Claude wants to run the command: npm test
Reply 1 (or YES) to allow once, 2 (or ALWAYS) to allow this kind of action for the rest of the session, 3 (or NO) to block it.
When Claude needs you to pick between options (the AskUserQuestion tool), you get a numbered poll on whatever channel you're on, and your reply is fed back as the answer.
Each message you send is tagged with its channel, so Claude knows whether it's on SMS, iMessage, email, or a call.
A channel prompt is appended to Claude Code's system prompt so replies fit a phone: plain text, no markdown, short, jargon kept to a minimum ("saved and published the change", not "pushed to origin/main").
Claude also gets Inkbox tools (inkbox_send_email, inkbox_send_sms, inkbox_send_imessage, …) so it can proactively reach you — "email me the full report" works.
Manual install
If you'd rather not run the installer (any Python 3.11+ environment):
pip install -e .
inkbox-claude setup # interactive wizard — writes .env for you
set -a; source .env; set +a
inkbox-claude doctor
inkbox-claude run
inkbox-claude setup walks you through everything and writes .env: create a fresh Inkbox agent via self-signup (or bring an existing API key), pick or create the identity, attach the Claude Code avatar to the agent's contact card (auto for a new self-signup agent; offered for an existing one with no avatar), provision a phone number, wait for your START opt-in, optionally enable OpenAI Realtime voice (validating your key), connect iMessage, mint a webhook signing key, choose the project directory, and set up autostart. Rerun it anytime to reconfigure. Prefer to wire .env by hand? Copy .env.example to .env and fill in INKBOX_API_KEY, INKBOX_IDENTITY, INKBOX_SIGNING_KEY, and CLAUDE_PROJECT_DIR yourself.
On startup the bridge opens an Inkbox tunnel, wires mail/text/iMessage webhook subscriptions and the incoming-call channel to it, and routes everything into Claude Code sessions.
Running it
inkbox-claude run # foreground (Ctrl+C to stop) — good for first runs and debugging
Or run it as a background daemon (PID + log under ~/.inkbox-claude/):
inkbox-claude start # detach and run in the background
inkbox-claude status # is it running? where are the logs?
inkbox-claude restart # restart it
inkbox-claude stop # graceful stop (SIGTERM, then SIGKILL after 5s)
tail -f ~/.inkbox-claude/gateway.log
start auto-loads .env from the current directory, so you don't have to source it first. run is the foreground version a service manager (systemd, Docker) should supervise; start/stop are the self-contained background option.
Start on boot
The setup wizard offers to keep the bridge running for you — either just in the background for this session, or as a service that starts on every boot. On Linux it installs a systemd user unit (~/.config/systemd/user/inkbox-claude.service) and enables it; on macOS it installs a launchd agent. To keep a Linux service alive while you're logged out, enable lingering once:
sudo loginctl enable-linger "$USER"
systemctl --user status inkbox-claude # restart | stop | status
Uninstall
inkbox-claude uninstall # stop it, remove the boot service + launcher; keep config
inkbox-claude uninstall --purge # also delete ~/.inkbox-claude (config, logs, sessions)
This is local-only — webhook subscriptions on the Inkbox side are left as-is; remove them in the Inkbox Console if you want.
Then, from your phone:
- Text
START to the agent's number (first time only, carrier opt-in).
- Text it something like "clean up the TODOs in the auth module".
- Approve the permission texts as they arrive. Get the result as a text.
How escalation works
Claude Code never silently runs anything destructive. The bridge passes a can_use_tool callback to the Claude Agent SDK:
- Read-only tools (
Read, Grep, Glob, WebFetch, …) and the Inkbox messaging tools run without asking. Override with INKBOX_AUTO_ALLOWED_TOOLS.
- Everything else (Bash, Write, Edit, …) blocks the agent mid-turn while the bridge texts you a one-line plain-language summary of what Claude wants to do. Your next message answers the escalation instead of starting a new turn — reply
1/yes, 2/always (session-scoped grant), or 3/no.
AskUserQuestion polls are formatted as numbered options; reply with the number or free text.
- No reply within
INKBOX_PERMISSION_TIMEOUT_S (default 10 min) → the tool call is denied and Claude is told you didn't answer; it carries on as best it can.
Sessions
Direct sessions are keyed by Inkbox contact, so one person shares context across channels. SMS and iMessage groups instead use their conversation ID: all participants share one session, separate from direct messages and other groups. Reactions and delivery recovery stay in that group. Claude session IDs persist in ~/.inkbox-claude/sessions.json across restarts. Each turn keeps its original reply destination, including errors and permission prompts. Automatic email replies use reply-all on the stored inbound message, preserving its To/CC and thread; explicit send tools can still start a new email. If a voice call ends before Claude finishes a voice reply, that late voice reply is dropped instead of silently switching to SMS or email.
A2A worker progress. Inbound A2A tasks receive an immediate pickup acknowledgement, followed by short progress updates about every three minutes until the task settles. Set INKBOX_A2A_PROGRESS_INTERVAL_SECONDS to change the cadence or 0 to disable periodic updates.
Typing indicator. While Claude works on a turn, the bridge keeps a typing indicator alive on your iMessage thread (refreshed every few seconds, since it expires) so you can see it's busy. SMS, email, and voice have no typing indicator, so this is iMessage-only.
Delivery failures. An outbound message can die two ways, and the bridge feeds both into one delivery-failure loop. It can be rejected at send time — the server's content policy blocks it (markdown artifacts, emoji overload), the recipient has opted out, the address is bad, or the body is too long — which comes back as an error on the send call. Or it can be accepted and then fail downstream — a carrier filters the SMS, an iMessage is declined, an email bounces — which Inkbox reports asynchronously (text.delivery_failed/text.delivery_unconfirmed, imessage.delivery_failed, message.bounced/message.failed). Either way the bridge wakes the affected contact's session to tell Claude which message didn't land and why, so it can fix and resend or reach you another way using its Inkbox tools. The wake-up runs as a side-effect turn — Claude acts via tools rather than replying on the channel that just failed. Sends are hard-capped at three per logical reply with the budget shared across both surfaces (keyed by conversation/recipient): after that the thread goes quiet with a loud log line instead of looping. The budget resets on a fresh inbound, a delivered receipt, or a 30-minute TTL, and repeat webhooks for the same message are de-duplicated. Transient (5xx) send failures are excluded — a bare resend clears those.
Interrupt by texting again. Messaging the agent again while it's mid-turn works like pressing Esc in Claude Code and typing a new message: the running turn is interrupted, its partial answer is dropped, and Claude picks up your new message instead. (A reply while it's waiting on a permission/poll still answers that escalation — interrupting only applies while it's actively working.)
Control commands. A handful of slash-commands steer the conversation itself and are handled by the bridge instead of being sent to Claude (works on any channel):
/clear (or /new) — start a fresh conversation: forgets the resumed session, tears down the client, and clears session-scoped permission grants.
/stop (or /cancel) — interrupt the current turn and drop anything queued, keeping your conversation context intact.
/resume — texts you back a numbered list of recent conversations for the project (each with a short summary and timestamp); reply with a number to reopen that one. Like /resume in the Claude Code CLI.
/status