[Bug] Discord channel plugin process not terminated on session end — orphan processes accumulate
Resolved 💬 3 comments Opened Mar 21, 2026 by gongpyung Closed Mar 25, 2026
Bug Description
When a Claude Code session ends (/exit or Ctrl+C), the Discord channel plugin server process (bun run --cwd .../discord/0.0.1 --shell=bun --silent start) is not terminated and remains as an orphan process.
Starting a new session with --channels plugin:discord@claude-plugins-official spawns a new process without killing the previous one, causing duplicate processes to compete for the same Discord bot token.
Steps to Reproduce
- Start Claude Code with Discord channel:
claude --channels plugin:discord@claude-plugins-official - Verify Discord plugin process is running:
ps aux | grep "discord.*start" - Exit Claude Code session (
/exitorCtrl+C) - Start a new session with the same command
- Check processes again:
ps aux | grep "discord.*start"
Result: Two Discord plugin processes are running simultaneously.
Expected Behavior
The previous session's Discord channel server process should be terminated when the session ends, before spawning a new one.
Impact
- Duplicate processes cause state contention on the Discord bot token
replycalls intermittently fail with"channel is not allowlisted"even thoughaccess.jsoncorrectly has the channel allowlisted- Users need to manually
pkill -f "discord.*start"to resolve
Environment
- Claude Code version: 2.1.81
- OS: macOS (Darwin 25.3.0)
- Discord plugin:
claude-plugins-official/discord/0.0.1 - Runtime: Bun
Workaround
Manually kill orphan processes before starting a new session:
pkill -f "discord.*start"This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗