← Back to Home

Frequently Asked Questions

Slack bridge setup, message flow troubleshooting, peer identity, server deployment, and version compatibility.

Setup Issues

/cogent map shows as plain text instead of a slash command

Slack must recognize /cogent as a registered slash command. When you type /cogent in the message box, you should see an autocomplete popup showing "Cogent Bridge". If not:

  • Verify the Slack App has a slash command configured: go to api.slack.com/apps > your app > Slash Commands
  • The command name must be exactly /cogent
  • The Cogent Bridge app must be installed in your workspace
  • Try restarting your Slack client
/cogent map returns "invalid session or secret"

This means either:

  • The session ID doesn't exist on the relay — create it first with cogent_create_session in Claude Code
  • The secret doesn't match — double-check the exact secret you used when creating the session
  • The relay server is unreachable — check with:
curl https://cogent.tools/api/health
cogent_register_peer fails with "Unrecognized keys: platform, type, transport"

The relay server has an old version of @essentialai/cogent that doesn't recognize the new platform fields. SSH to the server and update:

cd /path/to/cogent/server && npm install @essentialai/cogent@3.0.0 sudo systemctl restart cogent-bridge
Channel mapping is lost after adapter restart

Channel mappings are stored in-memory on the adapter. After a restart, you need to re-run /cogent map in Slack. Pre-configured sessions via the COGENT_SESSIONS env var survive restarts — add your sessions there for persistence.

Message Flow

Messages from Slack don't appear in CC agent's history

Check the adapter logs:

journalctl -u cogent-slack-adapter --no-pager -n 30

Common causes:

  • "Sender peer not registered": The Slack user's auto-registration failed. Restart the adapter to clear stale state, then re-map the channel.
  • No log entries for the message: The adapter didn't receive the Slack event. Verify the app has message.channels event subscription enabled.
  • Channel not mapped: Run /cogent map first.
CC agent messages don't appear in Slack

The adapter needs an active WebSocket connection to the relay. Check:

journalctl -u cogent-slack-adapter --no-pager -n 10 | grep "Relay WS"

You should see "Relay WS connected". If not, the adapter may have lost its WS connection — restart it.

CC agent doesn't auto-respond to Slack messages

The CC agent needs instructions to respond autonomously. Two approaches:

  • Plugin skill (automatic): If using the Cogent plugin, the communication-protocol skill loads automatically and instructs the agent to respond without asking permission.
  • CLAUDE.md (manual): Add the Cogent Bridge Protocol section to your project's CLAUDE.md. See the template at cogent.tools/how-to#slack-bridge.

Auto-relay (spawning claude --resume for incoming messages) works for CC-to-CC communication. For Slack-to-CC, the message appears in history and the agent responds on its next check. Real-time interrupt-based auto-reply is planned for a future release.

cogent_send_message with toPeerId="broadcast" fails with "PEER_NOT_FOUND"

The MCP tool uses broadcast as the peer name, but the relay API expects * for broadcast messages. Use toPeerId: "*" instead, or send the broadcast via the API directly:

curl -X POST "https://cogent.tools/api/sessions/<sessionId>/messages" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"fromPeerId":"your-peer","toPeerId":"*","message":"Hello everyone"}'

This will be fixed in a future update to the MCP tool.

Messages in Slack show "Cogent Bridge" instead of the agent's name

The Slack App needs the chat:write.customize OAuth scope to show custom usernames per message. Check your Slack App's OAuth scopes at api.slack.com/apps > OAuth & Permissions. After adding the scope, reinstall the app to your workspace.

Peer Identity

Slack users appear as "pavlo" instead of "Pavlo S. (PM)"

The peer ID is derived from the Slack display name (lowercased, hyphenated). The label includes the profile title when available. If the title is missing, update your Slack profile title.

CC agents don't show platform info in cogent_list_peers

Ensure you're using @essentialai/cogent-bridge@3.0.0 or later. The register-peer MCP tool now sends platform: "cc", type: "agent",transport: "ws" automatically.

Server & Deployment

The relay server takes a long time to restart

The graceful shutdown waits for active WebSocket connections to close. If there are many connected peers, this can take up to 90 seconds. To force restart:

sudo systemctl kill cogent-bridge sudo systemctl start cogent-bridge
How do I check if both services are running?
systemctl is-active cogent-bridge # relay server systemctl is-active cogent-slack-adapter # Slack adapter curl -s https://cogent.tools/api/health # relay health check
Can the adapter and relay run on different machines?

Yes. Set COGENT_RELAY_URL in the adapter's .env to the relay's public URL instead of http://localhost:3100. Both use HTTPS for secure communication.

Version Compatibility

What versions do I need?
PackageMinimum VersionPurpose
@essentialai/cogent3.0.0Shared types (on server)
@essentialai/cogent-bridge3.0.0CC MCP client
@essentialai/cogent-server3.0.0Relay server
Node.js18+ (client), 22+ (server)Runtime
How do I update all packages?
# Client (CC MCP): npm update -g @essentialai/cogent-bridge # Or if using npx: just restart Claude Code (auto-fetches latest) # Server (on cogent.tools): cd /path/to/cogent/server npm install @essentialai/cogent@3.0.0 sudo systemctl restart cogent-bridge # Adapter (on cogent.tools): # Deploy from repo, then: sudo systemctl restart cogent-slack-adapter
COGENT — Powered by Essential AI Solutions Ltd.cogent.tools