-
Notifications
You must be signed in to change notification settings - Fork 2
fix(channels): /reset in Telegram mode triggers full LLM inference causing late-reply leaks #2339
Copy link
Copy link
Closed
Labels
P2High value, medium complexityHigh value, medium complexitybugSomething isn't workingSomething isn't workingchannelszeph-channels crate (Telegram)zeph-channels crate (Telegram)llmzeph-llm crate (Ollama, Claude)zeph-llm crate (Ollama, Claude)
Description
Summary
In Telegram mode, the /reset command triggers full LLM inference (~10-13 seconds) instead of a quick context reset. This causes two problems:
- Poor UX: user sends
/resetand waits 10+ seconds for a response - E2E test failures: the delayed LLM response leaks into subsequent scenarios (captured by timestamp-based handlers), causing false failures
Reproduction
Run telegram_e2e.py and observe:
- The pre-test
/resettakes >10s, E2E times out at 10s - The delayed response arrives during
scenario_startup(after/startis sent) - The
startupscenario captures the/resetLLM response as the startup reply → FAIL - Same pattern:
scenario_reset's/resetresponse leaks intoscenario_skills
Expected Behavior
/reset should immediately clear conversation context and return a short confirmation (e.g., "Conversation reset.") without LLM inference.
Actual Behavior
/reset text is forwarded to the agent loop → LLM responds with "I cannot perform a reset operation directly. If you want to clear the current se..." after 10-13 seconds.
Root Cause
TelegramChannel.recv() returns the /reset text verbatim to the agent runner. The runner passes it to the LLM pipeline instead of handling it as a command. The CLI mode may handle this differently (needs investigation).
Impact
- E2E
startupandskillsscenario false failures - Telegram UX: 10-13s response time for
/reset
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2High value, medium complexityHigh value, medium complexitybugSomething isn't workingSomething isn't workingchannelszeph-channels crate (Telegram)zeph-channels crate (Telegram)llmzeph-llm crate (Ollama, Claude)zeph-llm crate (Ollama, Claude)