claude-code - 💡(How to fix) Fix [BUG] --channels: plugin process exits before Bun.serve starts when launched by Claude Code (fakechat / stdio transport)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

No error messages or logs are shown.No error messages or logs are shown. Claude Code starts normally and displays: but no error or warning is produced. ~/.claude/logs/ does not exist. Running netstat -na | grep 8787 returns no output, confirming the port is never opened

Code Example

No error messages or logs are shown.No error messages or logs are shown. Claude Code starts normally and displays:
Listening for channel messages from: plugin:fakechat@claude-plugins-official
but no error or warning is produced. ~/.claude/logs/ does not exist. Running netstat -na | grep 8787 returns no output, confirming the port is never opened
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

--channels with fakechat plugin: port 8787 never opens — plugin process appears to exit before Bun.--channels with fakechat plugin: port 8787 never opens — plugin process appears to exit before Bun.serve starts When launching Claude Code with --channels plugin:fakechat@claude-plugins-official, the session starts and shows Listening for channel messages from: plugin:fakechat@claude-plugins-official, but the fakechat UI at http://localhost:8787 is unreachable. netstat confirms the port is never opened. When running server.ts manually with stdin open, the port opens immediately and the UI works correctly. This suggests Claude Code is not keeping the plugin process alive long enough for Bun.serve to execute after await mcp.connect(new StdioServerTransport()).****

What Should Happen?

After launching claude --channels plugin:fakechat@claude-plugins-official, the fakechat plugin should start its HTTP server on http://localhost:8787 and the UI should be accessible in the browser, allowing messages to be exchanged between the browser and the Claude Code session.

Error Messages/Logs

No error messages or logs are shown.No error messages or logs are shown. Claude Code starts normally and displays:
Listening for channel messages from: plugin:fakechat@claude-plugins-official
but no error or warning is produced. ~/.claude/logs/ does not exist. Running netstat -na | grep 8787 returns no output, confirming the port is never opened

Steps to Reproduce

  1. Install Claude Code v2.1.143 and Bun v1.2.14 on Ubuntu 26.04
  2. Install the fakechat plugin inside a Claude Code session: /plugin install fakechat@claude-plugins-official
  3. Run /reload-plugins to activate the plugin
  4. Exit Claude Code and launch it with the channel flag: claude --channels plugin:fakechat@claude-plugins-official
  5. Observe that the session starts and shows Listening for channel messages from: plugin:fakechat@claude-plugins-official
  6. Open a browser and navigate to http://localhost:8787 — connection is refused
  7. Run netstat -na | grep 8787 — no output, port is not open

To confirm the plugin itself works correctly:

  1. Run the plugin manually: bun run ~/.claude/plugins/cache/claude-plugins-official/fakechat/0.0.1/server.ts &
  2. Run netstat -na | grep 8787 — port opens immediately and the UI is accessible at http://localhost:8787

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.143

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

  • The plugin's server.ts uses await mcp.connect(new StdioServerTransport()) before Bun.serve(...). When Claude Code launches the process, it appears to close stdin or not keep it open, causing the process to exit before reaching Bun.serve. When run manually with stdin open, the process stays alive and the HTTP server starts correctly.
  • ~/.claude/plugins/data/fakechat-claude-plugins-official/ exists but is empty, which may indicate the plugin installation is incomplete.
  • Running bun install --no-summary inside ~/.claude/plugins/cache/claude-plugins-official/fakechat/0.0.1/ did not resolve the issue.
  • Authentication: claude.ai account (Pro), not API key.
  • No proxy, no custom firewall rules blocking localhost.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] --channels: plugin process exits before Bun.serve starts when launched by Claude Code (fakechat / stdio transport)