Connect coop to Claude Code.
The Claude Code integration has two parts: a poll hook for receiving messages and a /coop command for sending them. Both are installed with a single CLI command.
coop hook install This does two things:
~/.claude/settings.json that fires on
UserPromptSubmit and SessionStart/coop slash command to
~/.claude/commands/coop.mdEvery time you submit a prompt in Claude Code, the hook runs:
coop session poll --format=hook --mark-read 2>/dev/null || true It:
session_idadditionalContext that Claude sees as environment contextIf there are no messages, the hook returns {} and Claude sees nothing extra.
|| true and a 5-second timeout.
Network failures never block Claude Code.
When messages exist, they appear as context before Claude processes your prompt:
## Coop Notifications
### From @alice in feature-auth (2m ago)
> The auth middleware needs token refresh handling.
> I've added a stub in src/middleware/auth.ts:42.
---
Reply: `coop session send feature-auth "message"` or use /coop
Type /coop in Claude Code to send a message. Claude will:
coop session send to deliver it
You can also pass arguments: /coop tell alice the auth fix is ready
— Claude will use your input to compose the message.
$ coop hook status
Poll hook — user scope (~/.claude/settings.json): installed
Poll hook — project scope (.claude/settings.json): not installed
/coop command (~/.claude/commands/coop.md): installed coop hook uninstall Removes the poll hook from settings.json and deletes the
/coop command file. Other hooks and commands are preserved.
By default, hooks are installed at user scope (~/.claude/settings.json).
To install at project scope instead:
coop hook install --scope project
This writes to .claude/settings.json in the current directory.
Note: the /coop command is always installed at user scope
since Claude Code commands are user-level.