Skip to content

[BUG] Telegram plugin auto-loads in all Claude Code sessions, not just --channels sessions #38098

Description

@neuralneeraj

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?

When the Telegram plugin is installed, every claude -c session (without --channels flag) automatically spawns a Telegram bun process that polls for messages. This causes multiple consumers competing for the same Telegram bot token, resulting in dropped/lost messages.

Steps to reproduce:

  1. Install Telegram plugin: claude plugin add telegram@claude-plugins-official
  2. Start session A: claude --channels plugin:telegram@claude-plugins-official
  3. Start session B: claude -c (no --channels flag)
  4. Both sessions spawn separate Telegram bun processes polling the same bot token
  5. Messages are randomly delivered to either session — ~50% message loss on the intended session

What Should Happen?

Expected behavior:
Only sessions explicitly started with --channels plugin:telegram@claude-plugins-official should spawn the Telegram plugin process. Plain claude -c sessions should not load channel plugins.

Actual behavior:
All sessions load installed plugins regardless of --channels flag. Each spawns its own bun server.ts process for the Telegram plugin, creating competing consumers on the same bot token.

Workaround:
Manually kill the extra bun/server.ts processes spawned by non-channel sessions.

Impact: Critical for Telegram users — messages are silently lost with no error indication.

Error Messages/Logs

Steps to Reproduce

  1. Install Telegram plugin: /install telegram@claude-plugins-official
  2. Start terminal A: claude --channels plugin:telegram@claude-plugins-official
  3. Start terminal B: claude -c (no --channels flag)
  4. Run: ps aux | grep "server.ts" — shows TWO telegram bun processes
  5. Send a Telegram message — it randomly goes to terminal A or B
  6. ~50% of messages silently lost on the intended session

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.81 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pluginsbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions