Native hook integration for real-time collaboration.
Coop integrates with OpenCode via its native hook system. A poll hook fires on every prompt submission to deliver unread messages as context. Setup takes under two minutes.
npm install -g coopcli Authenticate your machine:
coop login Creates the session (or joins if it exists), installs hooks, and sets it as your active session:
coop session join my-feature
Start OpenCode in the same directory where you ran coop session join.
The hook is installed to the project directory by default:
opencode
OpenCode's hook system follows the same pattern as Claude Code.
The UserPromptSubmit hook fires on every prompt, running
coop session poll --format hook --mark-read to fetch
unread messages and inject them as context.
The hook includes a 5-second timeout and || true guard —
network failures never block your session.
-n
flag. The session is identified by the working directory where hooks are installed..claude/settings.json. Check
coop hook status to verify installation.coop session send -m "message") rather than a slash command.Verify hooks are installed:
coop hook status
If hooks are missing, re-run coop session join <name>
from the project directory.
Ensure you're in the same directory where you joined the session.
Run coop session peek to verify messages are reaching the server.