[BUG] Discord plugin shows connected under --channels but does not receive gateway messages on Linux

Resolved 💬 14 comments Opened Mar 20, 2026 by keezppc Closed Jun 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running claude --channels plugin:discord@claude-plugins-official on Linux, the Discord plugin reports ✔ connected in /mcp, but the bot never receives Discord DMs. No pairing codes are issued, and no messages are delivered to the Claude session.

The same bot token works immediately on macOS. Running the plugin's bun server standalone on the same Linux machine also works correctly — DMs are received and MCP notifications are generated.

Evidence:

  • Plugin status in /mcp: ✔ connected
  • Discord gateway TCP connection established (ESTAB to 162.159.x.x) ✅
  • DMs received by bot: ❌ (access.json pending stays empty, no messages delivered)
  • Standalone bun run start on same machine: ✅ (DMs received, MCP notifications output to stdout)
  • Same token on macOS claude --channels: ✅ (works immediately)

Standalone test output (works):

discord channel: gateway connected as ControlClaude#9927
{"method":"notifications/claude/channel","params":{"content":"testing","meta":{"chat_id":"...","message_id":"...","user":"keezer","user_id":"713558987664130068","ts":"2026-03-20T21:54:33.645Z"}},"jsonrpc":"2.0"}

Via claude --channels (broken):

  • /mcp shows plugin as ✔ connected
  • Sending DMs produces no output, no access.json changes, no Claude response

What Should Happen?

DMs sent to the bot should be received and delivered to the Claude session, same as on macOS.

Steps to Reproduce

  1. Configure Discord bot token: /discord:configure <token>
  2. On Linux, run: claude --channels plugin:discord@claude-plugins-official
  3. Confirm plugin shows ✔ connected in /mcp
  4. DM the bot from Discord
  5. Observe: no response, no pairing code, access.json unchanged

Contrast with working standalone:

cd ~/.claude/plugins/cache/claude-plugins-official/discord/0.0.1
source ~/.claude/channels/discord/.env
DISCORD_BOT_TOKEN=$DISCORD_BOT_TOKEN bun run start 2>&1
# → "discord channel: gateway connected as BotName#XXXX"
# → DMs received immediately

Hypothesis

The Discord plugin's MCP transport connects successfully (explaining the ✔ connected status), but the Discord.js WebSocket gateway session is not functioning when the plugin is spawned as a subprocess by claude --channels. The TCP connection to Discord's Cloudflare IPs appears established but messages are not delivered — possibly the gateway session is authenticating but not properly receiving dispatch events in this subprocess context.

Error Messages/Logs

No errors visible. The plugin shows as connected and produces no stderr output. The Discord gateway TCP connection shows as ESTAB but no messages arrive.

Claude Code Version

2.1.80

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux (kernel 6.8.0-100-generic)

Terminal/Shell

bash

Additional Information

  • macOS with same token and same plugin version works immediately
  • The bot process spawned by claude --channels (bun subprocess) has an ESTAB TCP connection to 162.159.130.234:443 (Discord/Cloudflare), suggesting the gateway connection is established at the TCP level but not functioning at the application layer
  • No competing instances running during testing

View original on GitHub ↗

This issue has 14 comments on GitHub. Read the full discussion on GitHub ↗