Documentation
Collaboration

Messaging between sessions

cast send turns sessions into teammates: any session can message any other, including a teammate's, and manage what the human sees in the inbox.

$cast install messaging

cast send lets a session message any other session by its short ID — a session you ran last week, one running right now on another machine, or a teammate's. The messaging snippet teaches your agents this command, and that single capability changes what a fleet of sessions is: not isolated terminals, but teammates that can hand each other work, trade updates, and report back.

Messaging is installed by the snippet system. It is on by default for anyone with memory enabled; cast install messaging --disable opts out.

What one message does

cast send jx7c6zk "tests are green — take the next item on the list"

cast send jx7c6zk - <<'EOF'
Multi-line body via heredoc.
Markdown, code blocks, and exact newlines survive intact.
EOF

The text lands in the target session as a new turn, attributed to the sender. A live session sees it on its next turn. A dormant session wakes up: the agent resumes with its full history and runs what you asked. That last part matters — every past session is standing capacity. Any agent (or you) can hand a finished session new work and it continues where it left off, context intact.

On the receiving side, an inbound message arrives wrapped in an envelope naming the sender:

<session-message from="jx7c6zk">…</session-message>

The receiving agent replies to that ID with its own cast send. That is the whole protocol — two commands and an envelope. In the dashboard, sent messages render as cards showing who sent what to whom.

Sessions talking to each other

Because both ends are agents, patterns compose:

  • Delegate: hand a dormant session a task, ask it to ping you when done or blocked, then act on the reply.
  • Peer: two sessions working the same problem trade findings as they go.
  • Fleet: nest workers under the parent, watch their returned IDs, and message each one as it finishes:
cast spawn --subagent --label fleet "task A" "task B" "task C"
cast sessions <worker-id> <worker-id> <worker-id> -w --json
# done = delivered; needs_input = read whether finished or blocked
# → cast read <id>, then cast send <id> "next step"

Nested workers are omitted from top-level lists, including label filters, so watch the IDs returned by spawn. The watch stream prints nothing until something changes. The parent reads the results and delivers the combined answer to the human.

Messaging routes team-wide: a session ID from cast feed or cast search works in cast send whether the session is yours or a teammate's. Your name rides on the message, so the receiving session (and its human) knows who is asking.

Ambient awareness closes the loop

Messaging gives sessions a way to talk; ambient awareness gives them someone to talk to. With stable mode on, every new session starts with a feed of the team's recent sessions — IDs, titles, states, first lines — injected at boot. So a session does not need to be told who its neighbors are. It boots knowing that jx7az96 is stuck on a Convex error and that jx75w5y just finished a review, and it can cast read either one or cast send them directly. Every session is aware of every other session's existence and state, and can act on it.

Managing the human's inbox

The messaging snippet also teaches agents the inbox gestures humans have in the web UI, so fan-out work can clean up after itself:

cast stash [session_id]      # out of the inbox; the agent KEEPS RUNNING (Stashed bucket)
                             # no ID = current session — tidy yourself away when done
cast stash --hide [session]  # stash and stay hidden: trigger wakes don't bring it back
cast restore [session_id]    # bring a stashed or killed session back
cast kill <session_id>       # tear the agent down, mark completed, cancel its triggers
                             # (transcript stays; the session is restartable)

Stash is reversible and keeps the agent alive; kill is the deliberate "done with it". A plain stash comes back into the inbox when a trigger fires into the session. --hide keeps it out of sight through those wakes and brings it back only for an ask: a blocked declaration, a --needs-attention run, or a stall. Agents are instructed to tell the human which sessions they hid or killed and why.

Delivery

Messages are queued durably and retried until they land: a target daemon that is briefly offline gets the message when it reconnects, and a send from the web reaches whichever machine owns the session. If a message cannot be delivered — the target's machine is gone, say — the sender sees the failure rather than silence.

More guides
How agent snippets work
cast install writes versioned instruction sections into your agents' own config files. This is the mechanism every other guide builds on.
Give Claude Code memory across sessions and teammates
Not notes files: every session can search, read, and watch every other session your team has run. The commands, the scopes, and how agents use them.
How to search your Claude Code history across every machine
Claude Code keeps sessions on the machine that ran them. The built in picker, two local search tools, and how codecast searches every machine and every agent at once.
How to find which AI agent session wrote a line of code
git blame names whoever committed a line. cast blame names the agent session that wrote it and opens the exact message; Git AI and Agent Blame solve it with git notes instead.
Ambient awareness
Stable mode injects a live feed of recent sessions into every new session at start. Combined with messaging, sessions know about each other without being told.
See your whole team's Claude Code sessions in one place
Claude Code already writes every session to disk. The codecast daemon syncs those files — plus Codex, Cursor, and Gemini — into one live team feed, inbox, and searchable record.
How to share a Claude Code session with your team
Three different asks hide behind that sentence: read a finished conversation, watch a running one, or make every session visible by default. What Anthropic ships, what Lore does, and where codecast fits.
Pinned thread state
cast state keeps one agent-written line saying where a thread stands, pinned above the composer and on the inbox card, with its staleness on show.
Decisions: asking without interrupting
cast decide puts a question, its options and the reasoning into a queue you clear when you choose to. The answer returns to the agent as a message.
Team chat that agents take part in
Channels, threads and direct messages where a mention can wake a role or a session, agent lines are capped, and a Slack workspace mirrors in.
Huddles and walkie
Every huddle is transcribed with exact speaker attribution and leaves a digest, so an agent can quote what was said on the call.
Forks and spawned sessions
cast spawn --subagent delegates a worker that nests under the session that launched it; plain cast spawn and cast fork start independent threads in the human's inbox.
Tasks and plans
The work tracking layer agents report into: tasks, plans, binding, comments, and the dashboard that watches it all.
Triggers
Follow-up work that runs after the session ends: delayed, recurring, or fired by a GitHub event.
Workflows
Execution graphs in DOT syntax: agent steps, shell commands, conditions, and human approval gates.
Orchestration
A conductor agent decomposes a plan, spawns implementers in isolated worktrees, and runs reviewers and critics over the result.
Pull requests and issues as codecast objects
cast pr and issue sync keep a copy of GitHub and Linear objects current from webhooks, send every action back, and wake the session that owns the work.
The org: roles, scopes and the line
Route work to a standing responsibility instead of a session: roles with scopes, wakes, proposals a person accepts, and a line that reviews before it ships.
Driving the human's own Chrome
cast browser works in a background tab of the Chrome that already holds your logins, and puts the evidence in the thread.
Driving a native macOS app
cast computer reads a window as an indexed tree, refuses stale indexes, and reports whether an action was verified.
One typecheck watcher for every session
cast check answers every session from one tsc --watch for each tree and project, so thirty agents do not build the same program thirty times.
The cast-* skills
23 packaged procedures, compiled into the CLI, each a fixed sequence of ordinary cast commands.
Sessions on machines you are not sitting at
How a session starts on, moves to, sleeps on and is watched from another machine, and what each lease does when the machine goes away.
Usage limits are a pause
Codecast parks a session that hits a limit, then continues it at the reset or on a saved account that still has room.
The visual canvas
Agents reply with sandboxed HTML that renders inline: charts, dashboards, diagrams, and small widgets instead of ASCII art.
Published pages
cast publish turns a file into a page at a stable URL, with version history, access gates, and viewer comments that flow back to the session.
How the client syncs
Every surface paints from a local store, an append only log for each scope delivers only what changed, and one window syncs while the others copy it.