Sending Messages

Share context between Claude Code sessions.

Using /coop (recommended)

The easiest way to send a message is the /coop slash command inside Claude Code. Type it at any point in your conversation:

/coop

Claude reads your conversation history, composes a concise summary of what's relevant, and asks for your confirmation before sending. This is the recommended approach because Claude has full context about what you've been working on.

With arguments

You can guide what Claude sends:

/coop the auth token refresh is implemented, they should pull main
/coop ask if they've seen the failing test in user.test.ts
/coop share the API schema changes I just made

Claude will use your input along with conversation context to compose the message.

Using the CLI directly

You can also send messages from any terminal:

# Send to default session
coop session send "auth middleware needs token refresh"

# Send to a specific session
coop session send feature-auth "check the fix in auth.ts:42"

# Send file contents
coop session send --file ./notes.md

# Pipe from stdin
echo "here's the error log" | coop session send --stdin

Message types

Messages have a kind that hints at their purpose:

coop session send --kind context "the schema is in packages/shared/src/types.ts"
coop session send --kind request "can you check if the migration is safe?"

Limits

The 10 KB limit is enforced at both the schema level (Zod validation) and the Durable Object level. If you need to share larger content, send a file path or a summary instead of the full contents.

Receiving messages

If hooks are installed, messages appear automatically at each prompt. You can also poll manually:

# Human-readable format
coop session poll

# JSON output
coop session poll --format json

# Poll a specific session
coop session poll feature-auth

# Poll and mark as read
coop session poll --mark-read

End-to-end example

Alice's terminal

# Alice is working on auth
claude -n feature-auth

# In Claude Code, Alice types:
/coop the JWT validation is done, Bob should update the middleware

Bob's terminal

# Bob is working on the same feature
claude -n feature-auth

# Bob submits a prompt — the hook fires and injects:
#
#   ## Coop Notifications
#   ### From @alice in feature-auth (1m ago)
#   > JWT validation is complete. The token refresh logic is in
#   > src/lib/auth.ts:85-120. Update the middleware in
#   > src/middleware/verify.ts to call validateAndRefresh()
#   > instead of the current validate().
#
# Claude sees this context and can act on it.
← Back to Getting Started