Problem
With extended-thinking models (e.g. Claude with thinking enabled), every intermediate thinking block is relayed to Telegram as its own message. On a longer task this means a steady stream of notifications for content that is only scratch reasoning, not an actual answer.
CCGRAM_HIDE_TOOL_CALLS (added in #64) solved exactly this for tool_use/tool_result noise, but it does not cover thinking blocks: in handlers/messaging_pipeline/message_queue.py the hidden-filter only matches content_type in ("tool_use", "tool_result"), and the only gate for thinking messages is the 20-char minimum length in handlers/messaging_pipeline/message_routing.py (_MIN_THINKING_LENGTH). Verified against 4.1.0 and current main.
Proposal
A global env toggle, symmetric to the existing one:
CCGRAM_HIDE_THINKING=true
When set, thinking-type messages are dropped before relay; text replies, tool messages (subject to their own setting) and status updates are unaffected. A per-window override via the /verbose cycle would be a nice bonus, but the global env var alone already solves the pain.
Workaround I'm running now
Three-line local patch in message_routing.py:
_HIDE_THINKING = os.getenv("CCGRAM_HIDE_THINKING", "").lower() in ("1", "true", "yes")
# in handle_new_message, inside the per-user loop:
if msg.content_type == "thinking":
if _HIDE_THINKING:
continue
Works fine, but gets wiped on every uv tool upgrade ccgram. Happy to turn this into a PR (including the config plumbing in config.py analogous to hide_tool_calls) if you'd take it.
Thanks for ccgram — the terminal-first design is exactly right.
Problem
With extended-thinking models (e.g. Claude with thinking enabled), every intermediate thinking block is relayed to Telegram as its own message. On a longer task this means a steady stream of notifications for content that is only scratch reasoning, not an actual answer.
CCGRAM_HIDE_TOOL_CALLS(added in #64) solved exactly this for tool_use/tool_result noise, but it does not cover thinking blocks: inhandlers/messaging_pipeline/message_queue.pythe hidden-filter only matchescontent_type in ("tool_use", "tool_result"), and the only gate for thinking messages is the 20-char minimum length inhandlers/messaging_pipeline/message_routing.py(_MIN_THINKING_LENGTH). Verified against 4.1.0 and current main.Proposal
A global env toggle, symmetric to the existing one:
When set, thinking-type messages are dropped before relay; text replies, tool messages (subject to their own setting) and status updates are unaffected. A per-window override via the
/verbosecycle would be a nice bonus, but the global env var alone already solves the pain.Workaround I'm running now
Three-line local patch in
message_routing.py:Works fine, but gets wiped on every
uv tool upgrade ccgram. Happy to turn this into a PR (including the config plumbing inconfig.pyanalogous tohide_tool_calls) if you'd take it.Thanks for ccgram — the terminal-first design is exactly right.