--channels: plugin channel not binding under non-root user (works as root)
Summary
The experimental --channels feature does not bind a plugin-provided channel MCP server when Claude Code runs as a non-root user, even though the same plugin + identical command binds correctly as root. The Discord MCP connects fine, but channel notifications are silently skipped, so inbound Discord messages never inject into the session.
Environment
- Claude Code v2.1.177
- Linux (Ubuntu),
bun1.3.13, Node 20 - Plugin:
discord@claude-plugins-officialv0.0.4
Symptom
Launching:
claude --channels plugin:discord@claude-plugins-official
The startup banner correctly shows Channels (experimental) messages from plugin:discord@claude-plugins-official inject directly in this session, and the MCP debug log shows the server connects:
Starting connection with timeout of 30000ms
Successfully connected (transport: stdio) in 820ms
Connection established with capabilities: {"hasTools":true,...,"serverVersion":{"name":"discord","version":"1.0.0"}}
Channel notifications skipped: server discord not in --channels list for this session <-- BUG
Under the root user, the identical setup instead logs Channel notifications registered and works end to end.
The MCP server registers under the bare name discord (the key in the plugin's .mcp.json mcpServers), but the session "channels list" holds the plugin id plugin:discord@claude-plugins-official. The resolver appears not to map the plugin id → its provided server name when running as a non-root user.
What was tried (all still "skipped" under the non-root user)
--channels plugin:discord@claude-plugins-official,--channels discord,--channels plugin:discord- Plugin installed via: copied config, a local renamed marketplace, and a clean
claude plugin install discord@claude-plugins-officialfrom the official marketplace — all skip. - Verified
claude plugin listshowsdiscord@claude-plugins-officialenabled, marketplace configured, MCP connects (5 tools), same Anthropic account (so same GrowthBook/experiment flags),MESSAGE CONTENT INTENTenabled.
Expected
--channels plugin:<name>@<marketplace> should resolve to the plugin's declared channel MCP server and register channel notifications regardless of the OS user.
Actual
Channel notifications registered only when running as root; skipped for any other OS user, breaking inbound message delivery.
Notes
- Likely a difference in how the plugin id → MCP server name mapping (or a per-user state path) is resolved for the channels gate vs. how
rootresolves it. - Possibly related:
claude plugin marketplace add anthropics/claude-plugins-officialfails withERR_STREAM_PREMATURE_CLOSE(forces SSHgit@github+ recurse-submodules) for a non-root user, even though the exact samegit clonecommand succeeds when run directly in a shell — suggesting the internal git wrapper has a separate non-root issue.