tg-pane

Reviewed at commit 81fed17

Caution: Keeps a headless Chromium logged in to your Telegram account on disk and feeds channel posts to Claude for summaries, which can carry prompt injection.

Sends data to Telegram Web (web.telegram.org), only the messages and actions you ask for

Telegram in a Claude Code pane: private chats with replies, categories (all chats and folders), model summaries of unread posts

Made by
34823
What we checked

Opens a Telegram pane that lets you read chats, search, reply, edit, delete, react, forward and transcribe voice messages through your own Telegram Web login. It starts a background headless Chromium with your logged-in Telegram session saved on disk, runs local Python scripts against it, and the Summary buttons put unread or recent posts into your Claude conversation for retelling.

Review details

Static review of the source at the pinned commit; not run. Delta review of the changes since 2d89184; the rest carries over from the review at that commit. Registers session.start (registers the /tg-pane command, sets up timers), command.run for tg-pane, session.end, classic.SessionStart, ui.close, ui.scroll and ui.render for its pane; no tool.call, prompt.submit or permission hooks. Runtime calls: $.process.run of the user-configured Python (default python3) with its own backend scripts (tgbrowser.py, tgchat.py, tgsearch.py, tgcache.py, tgunread.py, tgmsg.py, tgact.py, tgmedia.py, tgview.py), $.fs.read of its own counters cache, $.store for pane position, theme and time zone, $.env.get for HOME, $.ui.open/toast/focus/panes, $.clock timers (counters once a minute and the open chat once a minute only while the pane is open and used within 10 minutes; a 10-minute pause after Telegram FLOOD_WAIT), and $.prompt.submit for the Summary buttons. The backend (Playwright, installed by the user, not by the mod) launches the Playwright Chromium detached and headless with a remote debugging port on 127.0.0.1 (default 9444) and a profile folder in the data dir (default ~/.local/share/tg-pane, created with mode 0700); that profile is a logged-in Telegram session, so any local process that reaches the debugging port can drive the account while the browser runs. The scripts drive web.telegram.org/k through its internal appImManager API: they read chat lists, unread counters, history, search results and downloaded pictures (stored as PNG under the data dir media folder), and on user action send, edit (own messages only), delete for everyone (own messages only), react, forward, mark read and transcribe. Sending text is limited to what the user types; private chats are marked read only when the user replies or presses Mark read; channels are marked read on open unless autoReadChannels is turned off, and the unread Summary marks channel and group posts read. Summary buttons call $.prompt.submit with a Claude prompt that tells Claude to run tgunread.py (with the data folder and time zone as shell environment assignments); the script prints the posts, so third-party channel text enters the conversation and can try to instruct Claude, and the Bash run still goes through normal permission checks. Login uses a QR code drawn in the pane; the cloud password is never typed into the pane, the pane tells the user to enter it in a terminal (getpass). No other hosts are contacted, no code is downloaded or evaluated outside the page-context scripts that are bundled, and nothing is sent anywhere except Telegram. What changed in this version: only the standalone curses frontend terminal.py (not loaded by the plugin) gained an inline picture preview that runs the existing tgmedia.py and draws cached PNGs with Pillow, plus a SKILL.md note and a test; the plugin's own files (hooks, register.tsx, backend) are unchanged. Read in full in the previous review: hooks/register.tsx state, process, prompt and command logic, types, and all backend scripts except the tail of tglib.py, which was checked by targeted search. npm and pip dependencies (Playwright, Pillow) are not reviewed.

What it uses
  • Reads your prompts: no
  • Sees tool calls: no
  • Blocks or changes tool calls: no
  • Reads or writes files: yes
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): yes
  • Sends data over the network: yes
  • Stores data: yes
  • Shows something on screen: yes
Hooked events

Telegram in a Claude Code pane: private chats with replies, search, message actions (reply, edit, delete, react, forward), voice transcripts, categories (all chats and folders), model summaries of channels

Made this mod? Add a badge to your README

modsforClaude badge for tg-pane

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/tg-pane.svg)](https://modsforclaude.com/mods/tg-pane/)

← All mods