메뉴
HN
Hacker News • 48일 전

클로드 코드, 다른 세션 간 메시지 교환 기능 출시

IMP
8/10
핵심 요약

Anthropic의 개발 도구인 Claude Code에 서로 다른 작업 세션 간에 메시지를 주고받을 수 있는 '세션 간 메시징' 기능이 추가되었습니다. 이제 한 세션에서 발생한 코드 변경이나 중요 결정을 AI가 다른 세션에 자동으로 알려주어, 개발자가 여러 창을 오가며 수동으로 상황을 동기화할 필요가 없습니다. 병렬 작업 및 장기 실행 작업의 조율이 훨씬 수월해진 매우 실용적인 업데이트입니다.

번역된 본문

세션 간 메시징은 Claude Code v2.1.224 이상이 필요하며 macOS와 Linux에서 작동합니다. 조건을 충족하면 메시징 기능은 별도로 활성화할 필요 없이 자동으로 켜집니다. 프로바이더 요구 사항과 기능 활성화 여부 확인은 '가용성(Availability)' 섹션을 참고하세요.

세션 간 메시징을 통해 Claude는 당신의 한 Claude Code 세션에서 다른 세션으로 메시지를 전달할 수 있습니다. 한 세션에서의 변경 사항이 다른 세션에서 진행 중인 작업을 방해할 때, 당신이 인지하기 전에 Claude가 해당 세션에 경고를 보낼 수 있습니다. 또는 한 세션에서 다른 세션이 막혀 있던 문제의 해결책을 찾았을 때, Claude가 그 답변을 전달해 줄 수 있습니다.

여기서 말하는 메시지는 하나의 Claude가 다른 Claude에게 작성하는 단순 텍스트 조각이며, 대화 기록이나 파일 자체가 아닙니다. 전체 대화나 컨텍스트를 옮기려면 세션을 다시 시작(resume)하세요. Claude는 도달할 수 있는 에이전트를 찾는 'ListAgents'와 이름으로 메시지를 전달하는 'SendMessage', 이 두 가지 도구를 사용합니다. 동일한 SendMessage 도구를 사용해 단일 세션 내의 하위 에이전트나 에이전트 팀원에게 메시지를 보낼 수도 있습니다. 이 문서에서는 당신의 독립적인 세션 간의 메시징에 대해 다룹니다.

세션 간 메시징은 언제 사용하나요?

한 세션이 작업 중반에 다른 세션에 필요한 정보를 얻었을 때 사용합니다. 다른 세션의 작업에 영향을 미치는 변경을 한 후 등 필요성을 느끼면 Claude가 자체적으로 메시지를 보낼 수도 있고, 당신이 직접 보내달라고 요청할 수도 있습니다.

일반적인 사례는 다음과 같습니다:

  • 발견 사항 전달: 한 세션에서 호환성을 깨는 변경 사항을 발견하거나 결정을 내렸을 때, 당신이 직접 재설명하는 대신 Claude가 영향을 받는 작업 중인 세션에 요약해서 전달합니다.
  • 병렬 작업 트리 조율: 여러 세션이 같은 저장소의 다른 작업 트리에서 작업할 때, 한 세션의 변경 사항이 적용되면 Claude가 다른 세션에 알려줍니다.
  • 장기 실행 작업의 상태 확인: 데이터베이스 마이그레이션이나 테스트 실행이 완료되면 당신이 보고 있는 세션에 결과를 보고하도록 하거나, 해당 세션에 직접 상태를 물어볼 수 있습니다.
  • 기기 간 응답: 다른 머신이나 웹에서 실행 중인 세션으로 온 메시지에 답장합니다. 기기 간 통신에서 Claude는 답장만 가능하며 대화를 먼저 시작할 수는 없습니다.

직접 시작하고 조종하는 독립적인 세션 간에만 메시징을 사용하세요. 여러 세션을 실행하고 연결하는 다른 목적에는 각각에 맞는 전용 기능이 있으므로, 상황에 맞는 기능을 사용하는 것이 좋습니다:

  • 다른 터미널에서 하나의 대화를 계속하거나 컨텍스트를 공유하려면 **세션 다시 시작(Resume)**을 사용하세요.
  • Claude가 생성하고 관리하는 조율된 세션 팀을 원한다면 **에이전트 팀(Agent Teams)**을 사용하세요.
  • 한 곳에서 여러 세션을 보고 제어하려면 **에이전트 뷰(Agent View)**를 사용하세요.
  • 세션끼리 메시지를 보내는 대신 휴대폰이나 다른 기기에서 직접 세션을 제어하려면 **원격 제어(Remote Control)**를 사용하세요.
  • CI 결과나 채팅 메시지 같은 외부 이벤트를 세션에 밀어 넣으려면 **채널(Channels)**을 사용하세요.

다른 세션에 메시지 보내기

한 세션이 발견 사항, 상태, 결정 등 다른 세션에 필요한 정보를 얻으면, 당신이 터미널 간에 복사하여 붙여넣는 대신 Claude가 이를 전달해 줍니다. Claude는 ListAgents로 대상을 찾고 SendMessage로 전송하므로, 당신이 직접 이 도구들을 호출할 필요는 없습니다. Claude가 스스로 판단해 메시지를 보낼 수도 있고, 당신이 요청할 수도 있습니다. 요청하려면 Claude에게 다른 세션이 무엇을 알아야 하거나 해야 하는지 말해주기만 하면 됩니다.

아래는 Claude가 보내는 메시지가 아니라, 당신이 입력하는 프롬프트의 예시입니다:

  • "내 다른 터미널에서 실행 중인 세션에게 마이그레이션이 끝났는지 물어봐."

Claude가 실제 메시지를 직접 작성하므로, 프롬프트에서 내용 구성은 Claude에게 맡겨도 됩니다. 아래 프롬프트는 문구를 일일이 지정하지 않고 요약을 요청하며, Claude가 보내는 내용은 가변적입니다:

  • "우리가 방금 한 일을 결제 API를 작업 중인 세션에게 설명해 줘."

Claude가 작성해서 보낸 메시지가 도착했을 때 어떻게 보이는지에 대한 예시는 '메시지 형태'를 참고하세요.

메시지 전달 방식

메시지를 받는 Claude는 활성화된 작업 턴 동안 도구 호출 사이에 메시지를 읽으므로, 실행 중인 도구는 결코 중단되지 않습니다. 수신 세션이 유휴 상태일 때, Claude Code는 해당 메시지로 새로운 작업 턴을 시작합니다. 두 개의 일반적인 대화형 세션 사이에서 작동합니다.

원문 보기
원문 보기 (영어)
Cross-session messaging requires Claude Code v2.1.224 or later and runs on macOS and Linux. When a session meets the requirements, messaging is on with nothing to enable. See Availability for provider requirements and how to confirm a session has it. Cross-session messaging lets Claude deliver a message from one of your Claude Code sessions to another. When a change in one session breaks what another is building on, Claude can warn that session before you notice. When one session settles a question another is blocked on, Claude can send the answer across. A message is a piece of text one Claude writes to another, never conversation history or files. To move a whole conversation or its context, resume the session instead. Claude uses two tools for this: ListAgents to discover which agents it can reach, and SendMessage to deliver a message to one of them by name. With the same SendMessage tool, Claude can also message subagents and agent team teammates within a single session or team. This page covers messages between your independent sessions. ​ When to use cross-session messaging Use messaging when one of your sessions has something another session needs mid-task. Claude can send a message on its own when it sees the need, for example after making a change that affects work another session is doing, or you can ask it to send one. The common cases: Hand over a finding : when one session discovers a breaking change or makes a decision, Claude summarizes it for the session working on the affected area, instead of you re-explaining it there. Coordinate parallel worktrees : when sessions work the same repository in separate worktrees , Claude can tell the other sessions what landed. Get status from long-running work : have a migration or test run report back to the session you’re watching, or ask it yourself from there. Reply across machines : answer a message that arrived from one of your sessions on another machine or on the web. Across machines, Claude can only reply. It can’t start the exchange. Use messaging between independent sessions that you start and steer yourself. Claude Code has a dedicated feature for each of the other ways to run or reach multiple sessions, so use the one built for what you’re doing instead: To continue one conversation in another terminal, or share its context with a new session, resume the session For a coordinated team of sessions Claude spawns and supervises, use agent teams To watch and steer many sessions from one place, use agent view To steer a session yourself from your phone or another device, rather than have sessions message each other, use Remote Control To push external events, such as CI results or chat messages, into a session, use channels ​ Message another session When one of your sessions learns something another session needs, such as a finding, a status, or a decision, Claude passes it along instead of you copy-pasting between terminals. Claude discovers the target with ListAgents and sends with SendMessage , so you never call either tool yourself. Claude can decide to send a message without being asked, and you can also prompt for one. To prompt one yourself, tell Claude what you want the other session to know or do. This example is a prompt you type, not a message Claude sends: Ask the session running in my other terminal whether the migration finished Claude writes the actual message itself, so your prompt can leave the content to Claude. This prompt asks for a summary without dictating its wording, and what Claude sends varies: Explain what we just did to the session working on the payments API For what the message Claude writes looks like when it arrives, including an example of one, see what a message looks like . ​ Message delivery The receiving Claude reads the message between tool calls during an active turn, so a running tool is never interrupted. When the receiving session is idle, Claude Code starts a new turn with the message. Between two ordinary interactive sessions with default settings, Claude Code delivers the message. Delivery isn’t guaranteed in every configuration, though. The receiving session checks each arriving message against its own inbound controls , and the check ends in one of three outcomes: Delivered : Claude Code passes the message to the receiving Claude. Held : Claude Code sets the message aside undelivered. A held message reaches Claude only when you approve it or a later mode or settings change allows it. Refused : Claude Code drops the message without delivering it. Once delivered, the message counts toward usage like a prompt you type, and the receiving Claude can reply to the sender the same way, except in the one-way cross-machine case . Permission boundaries stay per-session. Claude is instructed never to ask another session for an action that was denied or blocked in its own session, or that its own permission settings would block, and to route that work back to you instead. On the receiving side, the receiving session’s own permission prompts and rules still apply to anything the message asks for. ​ See which sessions Claude can reach Claude finds a message’s target on its own, so you don’t need to run anything before asking it to send. To see for yourself which sessions Claude can reach, run the /list-agents command. It lists each session with the name it answers to, and that name is where Claude addresses a message. The listing covers: Subagents : agents running inside the current session. Agent team teammates aren’t listed; Claude messages them through the team’s own roster. Your other local sessions : Claude Code sessions running on the same machine, including background sessions . A session appears only when it binds an inbox socket . Sessions beyond this machine : shown while Remote Control is connected and labeled Remote Control . These are your sessions on other machines and your Claude Code on the web sessions. Claude can’t send a message to start a conversation with one of these sessions. It can only reply to a message that arrived from one of them. See Message sessions on other machines . A session answers to the name you set with the /rename command or the --name flag. When you don’t set one, Claude Code names the session itself. An interactive session gets a name derived from its working directory’s folder name, such as myapp-3f . Two sessions can end up with the same name. The /list-agents output shows each local session’s working directory, which tells same-named sessions apart when they run in different directories. Claude’s own listing adds a short identifier to each row and uses it in the address when names collide. ​ Message sessions on other machines Where the other session runs decides how a message travels and what Claude here can send: Where the other session runs How the message travels What Claude here can send On this machine Over a per-session socket, never through Anthropic servers New messages and replies On another of your machines Through Anthropic servers, arriving over that machine’s Remote Control connection Replies only On Claude Code on the web Through Anthropic servers, straight to the cloud session Replies only Same-machine delivery works wherever the feature is enabled. Each session registers itself in files on disk and binds its inbox socket there. When Claude lists or messages your local sessions, Claude Code reads those files to find them, so two sessions can reach each other only when they can see the same files. A container has its own filesystem, so a session inside it and a session on the host can’t reach each other. Two sessions inside the same container can still message each other, including on a self-hosted runner . A reply needs a reply address , and almost every message carries one. A reply to a session beyond this machine, sent while the replying session isn’t connected to Remote Control, still goes through as a direct request to Anthropic servers, but it arrives without a reply address, so the receiver ca