[BUG] Telegram plugin: frequent HTTP 401 authentication errors mid-session

Resolved 💬 6 comments Opened Apr 13, 2026 by callmejustdodo Closed Jun 11, 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?

The Telegram plugin (v0.0.5) frequently returns HTTP 401 authentication errors while a Claude Code session is actively running. The error message shown in the Telegram chat is:

HTTP 401: authentication_error: Invalid authentication credentials

The bot process itself stays alive (no crash), but the Claude API rejects requests intermittently. Messages sometimes succeed and sometimes fail within the same session.

What Should Happen?

Messages sent via Telegram should be processed without authentication errors for the entire duration of an active Claude Code session.

Error Messages/Logs

HTTP 401: authentication_error: Invalid authentication credentials

Steps to Reproduce

  1. Start a Claude Code session with the Telegram channel enabled: claude --channels plugin:telegram@claude-plugins-official
  2. Send messages from Telegram to the bot
  3. Some messages are processed successfully, but frequently the bot replies with the 401 authentication error
  4. Restarting the Claude Code session temporarily resolves the issue, but errors recur

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.105 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • Telegram plugin version: 0.0.5
  • The bot process remains running (confirmed via ps) — it does not crash
  • The error originates from the Claude API, not from the Telegram Bot API
  • The error string does not appear in the plugin source code (server.ts), confirming it comes from upstream
  • macOS Darwin 24.6.0

Screenshot from Telegram showing the issue:

<img width="585" height="1266" alt="Image" src="https://github.com/user-attachments/assets/29d44900-1aef-451c-b487-a8a0c76c6809" />

See attached screenshot showing multiple 401 errors interspersed with successful responses in the same session.

View original on GitHub ↗

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