Skip to content

Two UX issues with Telegram message handling #190

Description

@mupic

Problem 1: Sequential message processing breaks multi-message context

When a user sends a task description across multiple Telegram messages (because it doesn't fit in one), the bot responds to each message individually and sequentially. This creates several problems:

• Claude responds to incomplete context mid-stream
• Each intermediate message triggers a full response cycle
• Large tasks that naturally span multiple messages become impossible to describe coherently

Proposed fix: Implement a short accumulation window (e.g. 2-3 seconds). If a new message arrives while the previous one is being processed (or within the window), buffer all messages and pass them to Claude together as a single context block before generating a response.


Problem 2: Background tasks block the ability to respond to new messages

When Claude launches a background agent (via run_in_background: true), the conversation context is tied up waiting for the notification. The bot cannot process new messages from the user during this time.

Expected behavior: While a background task is running, the bot should remain available - capable of receiving and responding to new messages in parallel, without being blocked by the running agent.


Why this matters: These two issues together make it very difficult to delegate long-running tasks via Telegram. The user can't describe a complex task across messages, and can't interact with Claude while the task executes.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions