Claude Code v2.1.224: Self-Hosted Runners and Sessions That Message Each Other#

Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog

Coming from v2.1.222, a v2.1.224 user can turn their own machines or containers into a place Claude Code web, mobile, and desktop sessions run, and can have separate sessions send messages to each other across machines. The first arrives as claude self-hosted-runner on Team and Enterprise plans; the second as a cross-session SendMessage tool paired with ListAgents to discover peers, on macOS and Linux.[1]

Self-hosted runners#

claude self-hosted-runner installs as a launchctl or systemd service (--json-path defaults to ~/.claude/daemon.json, --log-file to ~/.claude/daemon.log) and hosts sessions dispatched from the web, mobile, and desktop clients. The binary carries a setup wizard that greets the operator and walks environment creation, plus a local health surface: a GET /healthz on 127.0.0.1 with a 2-second timeout, and a /metrics endpoint exposing claude_code_self_hosted_runner_* Prometheus gauges for capacity, active and pending sessions, queue wait, spawn-hook duration, and clock skew. Runners read their assignment from a family of CLAUDE_RUNNER_* variables (session and pool ids, checkout path, work-order file, API base URL, repo revision). The tool notes that an organization can require approval before a runner is used.

Sessions messaging each other#

CLAUDE_CODE_MESSAGING_SOCKET names a Unix domain socket for the new uds-messaging transport (sockets live under /tmp/cc-socks-*). The transport refuses a non-local socket path and refuses to bind one that is already live ("--messaging-socket-path points to a live socket: Another process is listening there"), and drops any connection whose line exceeds 1 MiB. Delivery runs through the agents_cross_session_inbox gate; with it off, sends are skipped.

Two settings govern what a session accepts. crossSessionInbound holds an inbound message for your approval when the sending session bypasses permissions and its permission-mode class does not match the receiver; messages between matching sessions auto-deliver. dialogExpiry sets, in its own schema words, the "max time a permission/user dialog forwarded to a remote client stays parked awaiting an answer, and how long a HELD cross-session message stays held," accepting 60s, 5m, 10m, or never. This release also removes the 200-subagent-per-session spawn cap, so long-running sessions no longer refuse new agents.

Fixes worth naming#

Long project paths (over 200 characters) previously resolved to another project's session directory under a shared sanitized prefix, so session list, rename, fork, delete, and /resume could cross projects; that is fixed. Sandbox filesystem deny entries written with a trailing slash (denyRead: "~/.aws/") were silently bypassable on Linux and macOS and now hold. SendMessage no longer reports "Message sent" when the write to a teammate's inbox actually failed. Plugins also gain an archive source, installable from a zip over HTTPS with optional SHA-256 pinning.[1]

New Environment Variables#

VariableWhat It Does
CLAUDE_CODE_MESSAGING_SOCKETPoints at the Unix domain socket for cross-session messaging. The transport refuses a non-local path and refuses to bind a socket another process already listens on, and enforces a 1 MiB per-line cap. Bisect confirms it first shipped in v2.1.224 (published 2026-08-07).
ANTHROPIC_BEDROCK_REGION_PREFIXTells Bedrock to prefer a specific cross-region inference-profile prefix over the one derived from AWS_REGION. The binary is explicit that this is "a preference, not a residency guarantee," and warns when it is applied without an availability check or when a model resolves to a different prefix. Also first shipped in v2.1.224.

What these tell us#

The two headline additions push Claude Code past a single local process. Self-hosted runners give an organization its own execution pool, wired for observability from the start: a health check, Prometheus gauges for queue depth and spawn timing, and per-runner identity through CLAUDE_RUNNER_*. Cross-session messaging adds a peer channel between sessions, and the guardrails around it are the interesting part. Delivery is gated, the socket must be local, and an inbound message from a permission-bypassing session with a mismatched mode is parked rather than auto-run.

The supporting fixes point the same direction. Long-path session isolation, the trailing-slash sandbox deny fix, and the honest SendMessage failure report all tighten a surface that now spans multiple sessions and machines. Removing the 200-subagent cap fits a runner that is expected to stay up and keep spawning work.

This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners. This content is not intended to infringe on any intellectual property rights, circumvent any protections, or encourage unauthorized access to proprietary systems.

Sources#

  1. Claude Code Official Changelog, v2.1.224 release notes