How to update Cogent Bridge to the latest version, verify your setup, and fix common issues.
When a new version is released, you need to update three things: the CC plugin, the npm package cache, and restart all CC sessions. Skipping any step means old code keeps running.
Expected: Plugin updates to the latest version.
If that doesn't work, force-clear the plugin cache and let CC re-fetch on next launch:
Claude Code runs the MCP server via npx, which caches old versions. Force a clean fetch:
Verify the latest version is available:
Expected: The version number matching the latest release.
Close every open Claude Code window — type /exit in each one, or quit the terminal entirely.
Verify no stale processes remain:
Expected: No output. If you see processes:
If you're using cloud mode (cogent.tools), check the server is running the latest version:
Expected: JSON with "version" matching the latest release. If the version is old, contact your server administrator.
Open new terminal windows and start Claude Code. The new MCP server will load automatically from the updated npm package.
Open a fresh CC session and paste:
Expected: Both tools return "success": true.
Open two fresh CC sessions in separate terminals.
Terminal A — paste:
Terminal B — paste:
Expected: Terminal B's cogent_send_message blocks for a few seconds while Agent A processes via auto-relay, then returns Agent A's response.
Requires a Slack channel mapped to a Cogent session via /cogent map.
In a CC session — paste:
Replace your-channel, your-secret, and slack-username with your actual values.
Expected:
cogent_send_message blocks waiting for the Slack user's reply (up to 120 seconds)Expected: One WebSocket state: connected line per registered peer.
Expected: Lines showing Auto-relay: processing message and Auto-relay: response sent back.
| Symptom | Cause | Fix |
|---|---|---|
npm view shows old version | npm cache stale | npm cache clean --force then rm -rf ~/.npm/_npx |
| "appears offline" when sending to a peer | Server version mismatch or peer not connected via WS | Check curl -s https://cogent.tools/api/health shows latest version. Check peer log for WebSocket state: connected |
| WebSocket never connects | Old MCP server process still running | pkill -f cogent-bridge, close all CC windows, start fresh |
| Plugin shows old version | Plugin cache not cleared | rm -rf ~/.claude/plugins/cache/cogent then restart CC |
| Only one peer gets WebSocket | Second peer's join_session didn't trigger reinit | Check ~/.cogent/logs/bridge-*.log for errors after "Startup complete" |
cogent_join_session fails with 401 | Wrong secret for existing channel | Double-check the secret matches the one used when the channel was created |
cogent_send_message times out (120s) | Target peer offline or CC session ended | Check target peer's log for Auto-relay: processing. If missing, the peer's CC session may have ended |
CLI_NOT_FOUND | claude not on PATH | Set COGENT_CLAUDE_PATH in .mcp.json to the full path (find with which claude) |
LOCK_TIMEOUT | Lock held by dead process | Delete ~/.cogent/cogent-state.json.lock |
| Messages arrive but CC agent says "no notification" | Auto-relay processes in background subprocess | Expected behavior. Check logs for Auto-relay: processing to confirm messages were handled. Response goes back to sender automatically |
Cogent Bridge logs are stored in ~/.cogent/logs/. Each MCP server instance creates its own log file.
If nothing else works, do a complete clean slate:
cogent_join_session again.| Variable | Default | Description |
|---|---|---|
COGENT_STATE_PATH | ~/.cogent | State directory for logs, credentials, and local state |
COGENT_LOG_LEVEL | info | Log verbosity: debug, info, warn, error |
COGENT_TIMEOUT_MS | 120000 | Timeout for claude --resume subprocess calls (ms) |
COGENT_CHAR_LIMIT | 0 | Max message length (0 = unlimited) |
COGENT_STALE_TIMEOUT_MS | 1800000 | Idle peer timeout before stale cleanup (30 min) |
COGENT_CLAUDE_PATH | claude | Path to the Claude CLI executable |
COGENT_ENDPOINT | not set | Cloud relay URL (e.g., https://cogent.tools). Enables cloud mode when set |