gwendolenmave/claudep-telegram-thinking — explained in plain English
Analysis updated 2026-05-18
Show a collapsible 'thinking' section in a Telegram bot backed by Claude Code CLI.
Parse the NDJSON stream-json output format to separate reasoning from the final answer.
Design a filtered, one-sentence public reasoning summary instead of exposing raw internal thoughts.
| gwendolenmave/claudep-telegram-thinking | 0whitedev/detranspiler | 0xluk3/zk-resources | |
|---|---|---|---|
| Stars | 21 | 21 | 21 |
| Language | — | Python | — |
| Setup difficulty | moderate | hard | easy |
| Complexity | 3/5 | 4/5 | 1/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing Telegram bot backend that calls Claude Code CLI directly, behavior may vary across CLI versions.
This repository is a written tutorial, not a runnable application, that explains how to show Claude Code CLI's internal reasoning as a collapsible section inside a Telegram bot message. It targets developers who already have a Telegram bot backed by the claude -p command line tool and want to display its thinking process alongside the final answer. The guide walks through switching the CLI call from a plain JSON output mode to a streaming NDJSON mode, which separates the model's structured thinking blocks from its final answer in the output. It shows how to write a small TypeScript parser that reads each line of that stream, collects the thinking text, and pulls out the final result separately, being careful not to mix debug or system events into the visible reply. It then covers two different ways to present that thinking to end users. The first, called Raw Thinking, shows the full or truncated reasoning text and is recommended only for local debugging, not for regular users. The second, called Little Thought, distills the reasoning down to one short, safe, user facing sentence, with rules to filter out anything that looks like internal instructions, system prompts, or private context before it is shown. The guide includes example code for rendering the collapsible section using Telegram's expandable blockquote formatting, along with fallback formatting in case that fails. The tutorial is written primarily in Chinese and is aimed at developers building or customizing their own Telegram bot on top of Claude Code CLI, rather than at end users of such a bot. It emphasizes testing carefully in an isolated environment first, since the exact structure of the thinking output can change between CLI versions and models.
A developer tutorial showing how to parse Claude Code CLI's streaming output and display its internal reasoning as a collapsible section in a Telegram bot.
No license is stated in the README for this tutorial content.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.