Feature Request: Cross-machine session messaging for multi-device Claude Code users

Resolved 💬 3 comments Opened Mar 22, 2026 by mp719lkh Closed Mar 25, 2026

Summary

When using Claude Code on multiple machines (e.g., a desktop workstation and a laptop, or Linux + macOS), there's no built-in way for one session to notify another about changes. I built a lightweight git-based messaging system to solve this, and I think a native version would benefit multi-device users.

Problem

  • I make changes on Machine A (dotfiles, configs, shared code) and need Machine B's Claude session to know about it
  • Currently, each session starts fresh with no awareness of what happened on other machines
  • Manual sync is error-prone — you forget to pull, or don't realize something changed

What I Built (proof of concept)

A git-based mailbox between two machines:

mailbox/
├── a_to_b/        # A's outbox = B's inbox
│   └── read/      # archived after reading
└── b_to_a/
    └── read/

<details>
<summary>Concept (pseudocode)</summary>

# --- SEND ---
# create message file: YYYY-MM-DD_HHMMSS_{topic}.md
# git commit + push

# --- RECEIVE (runs on SessionStart hook) ---
# git pull
# for each *.md in my inbox:
#     display content
#     if topic matches "repo-sync":
#         auto-run: git pull target_repo + apply config
#     move to read/
# git commit + push (archive)

# --- URGENT (optional) ---
# try SSH direct write to remote inbox
# fallback to git if SSH fails

</details>

Key design choices:

  • Messages are plain markdown files — human-readable, git-tracked
  • SessionStart hook auto-checks inbox on every new Claude session
  • Topic-based auto-actions (e.g., "repo-sync" triggers git pull + config apply)
  • Urgent path via SSH for time-sensitive delivery, git fallback

Why This Could Be a Built-in Feature

  1. Session continuity across machines — Claude Code already has memory and CLAUDE.md for single-machine persistence. Cross-machine messaging is the natural next step.
  2. Zero infrastructure — could use Anthropic account identity instead of hostname heuristics, relay through Anthropic's servers instead of user-hosted git
  3. Hook integration — already fits the SessionStart hook pattern
  4. Use cases beyond sync:
  • "Deploy finished on server, tests passed" → notify laptop session
  • "Config changed, run X to update" → auto-apply on other machine
  • Session-to-session notes and context handoff

Suggested Design (minimal)

  • claude msg send <topic> "body" — send to other machines
  • claude msg check — check inbox (or auto-check on session start)
  • Messages stored in ~/.claude/messages/ or synced via Anthropic account
  • Optional: topic-based auto-actions (user-configurable)

Current Limitations of My DIY Approach

  • Requires a shared git repo and SSH/network between machines
  • Machine detection is hostname-based (fragile)
  • No encryption (messages are plaintext in git)
  • A native solution could use Anthropic account identity instead

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗