[Bug]: Telegram plugin enabled causes agent runs to skip local LLM provider calls entirely
Summary
When plugins.telegram.enabled: true and channels.telegram.enabled: true are both configured, Telegram messages trigger agent runs but the local LLM provider is never called. The agent run completes with "Connection error" despite the proxy being reachable and functional for other channels (webchat).
Environment
Configuration
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "<REDACTED>"
}
},
"plugins": {
"entries": {
"telegram": {
"enabled": true
}
}
},
"models": {
"providers": {
"localProxy": {
"baseUrl": "http://localhost:1234/anthropic",
"apiKey": "<REDACTED>",
"auth": "token",
"api": "anthropic-messages"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "localProxy/anthropic--claude-4.5-sonnet"
}
}
}
}
Steps to Reproduce
- Configure both
channels.telegram.enabled: true and plugins.telegram.enabled: true
- Ensure LLM proxy is running and accessible (verified: works for webchat)
- Send a message to the Telegram bot from an authorized user
- Observe: Message is received and appears in webchat (shared session)
- Observe: Agent run is triggered with
messageChannel=telegram
- Observe: No LLM provider request is made (confirmed: proxy receives zero requests)
- Result: Session history shows assistant turn with
"stopReason":"error","errorMessage":"Connection error."
Expected Behavior
- Telegram message triggers agent run
- Agent run calls LLM provider (
http://localhost:1234/anthropic)
- LLM response is generated
- Reply is delivered to Telegram (or at least attempted)
Actual Behavior
- Telegram message triggers agent run ✅
- Agent run skips LLM provider call entirely ❌
- No HTTP request reaches the proxy (verified via proxy logs)
- Session shows empty assistant turn with "Connection error"
- No response delivered to Telegram
Diagnostic Evidence
Gateway Logs (plugin enabled, Telegram message sent)
10:51:55 [telegram] update: {"update_id":143725665,"message":{"message_id":29,"from":{"id":3463194322,...},"text":"test"}}
10:51:56 telegram inbound: chatId=3463194322 from=telegram:3463194322 len=83
10:51:56 [agent/embedded] embedded run start: runId=96f071a8-a428-4a7a-a583-c0836d6ad116 sessionId=2e37a42d-7e93-44e1-984c-e7df4a531b1a provider=localproxy model=anthropic--claude-4.5-sonnet thinking=off messageChannel=telegram
10:51:56 [agent/embedded] embedded run agent start: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:51:57 [agent/embedded] embedded run agent end: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:51:59 [agent/embedded] embedded run agent start: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:52:00 [agent/embedded] embedded run agent end: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:52:05 [agent/embedded] embedded run agent start: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:52:06 [agent/embedded] embedded run agent end: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:52:14 [agent/embedded] embedded run agent start: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:52:15 [agent/embedded] embedded run agent end: runId=96f071a8-a428-4a7a-a583-c0836d6ad116
10:52:15 [agent/embedded] embedded run done: runId=96f071a8-a428-4a7a-a583-c0836d6ad116 sessionId=2e37a42d-7e93-44e1-984c-e7df4a531b1a durationMs=19511 aborted=false
Key observation: Multiple agent start/end cycles (retry pattern), but no tool calls, no LLM streaming, no HTTP logs.
Gateway Logs (plugin disabled, same message via webchat)
10:57:51 [agent/embedded] embedded run start: runId=467e621d-54db-46d8-a8fc-dc3da828bfbd sessionId=2e37a42d-7e93-44e1-984c-e7df4a531b1a provider=localproxy model=anthropic--claude-4.5-sonnet thinking=off messageChannel=webchat
10:57:51 [agent/embedded] embedded run agent start: runId=467e621d-54db-46d8-a8fc-dc3da828bfbd
10:57:54 [agent/embedded] embedded run tool start: runId=467e621d-54db-46d8-a8fc-dc3da828bfbd tool=exec toolCallId=toolu_bdrk_018Pwh3ij9QjFdkdBom1uuKj
10:57:54 [agent/embedded] embedded run tool end: runId=467e621d-54db-46d8-a8fc-dc3da828bfbd tool=exec toolCallId=toolu_bdrk_018Pwh3ij9QjFdkdBom1uuKj
10:57:56 [ws] → event agent seq=4 clients=1 run=467e621d…bfbd agent=main session=main stream=assistant aseq=5 text=**test
...
10:58:02 [agent/embedded] embedded run done: runId=467e621d-54db-46d8-a8fc-dc3da828bfbd sessionId=2e37a42d-7e93-44e1-984c-e7df4a531b1a durationMs=11686 aborted=false
Key difference: Tool calls execute, streaming output appears, LLM response generated successfully.
Session History (Telegram messages with plugin enabled)
{
"type":"message",
"id":"636c41eb",
"parentId":"87ec5414",
"timestamp":"2026-02-11T11:13:29.235Z",
"message":{
"role":"assistant",
"content":[],
"api":"anthropic-messages",
"provider":"localProxy",
"model":"anthropic--claude-4.5-sonnet",
"usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},
"stopReason":"error",
"timestamp":1770808407836,
"errorMessage":"Connection error."
}
}
## Workaround
**Disable the Telegram plugin:**
```json
{
"plugins": {
"entries": {
"telegram": {
"enabled": false
}
}
}
}
Root Cause Hypothesis
When plugins.telegram.enabled: true, the plugin may be:
- Intercepting the agent run flow and preventing LLM provider resolution
- Overriding the model/provider config for
messageChannel=telegram runs
- Short-circuiting the request builder before HTTP calls are made
- Conflicting with the channel handler causing dual message processing
The LLM provider call is completely skipped (not failing at HTTP level), suggesting an early return or exception in the agent run preparation phase.
Related Issues
Additional Context
- Both Telegram channel and plugin should NOT need to be enabled simultaneously - unclear from docs what the intended behavior is
- Plugin appears to handle message reception, but breaks LLM invocation
- Channel-only mode works for message reception (messages appear in webchat), but replies don't route back to Telegram
Impact
- Telegram integration is completely non-functional when plugin is enabled
- Users cannot receive responses via Telegram
- Creates confusion about correct configuration (channel vs. plugin vs. both)
Request
Please investigate:
- Is having both
channels.telegram and plugins.telegram enabled a supported configuration?
- Why does
messageChannel=telegram prevent LLM provider calls?
- Should the plugin be deprecated in favor of channel-only mode?
[Bug]: Telegram plugin enabled causes agent runs to skip local LLM provider calls entirely
Summary
When
plugins.telegram.enabled: trueandchannels.telegram.enabled: trueare both configured, Telegram messages trigger agent runs but the local LLM provider is never called. The agent run completes with "Connection error" despite the proxy being reachable and functional for other channels (webchat).Environment
Configuration
{ "channels": { "telegram": { "enabled": true, "botToken": "<REDACTED>" } }, "plugins": { "entries": { "telegram": { "enabled": true } } }, "models": { "providers": { "localProxy": { "baseUrl": "http://localhost:1234/anthropic", "apiKey": "<REDACTED>", "auth": "token", "api": "anthropic-messages" } } }, "agents": { "defaults": { "model": { "primary": "localProxy/anthropic--claude-4.5-sonnet" } } } }Steps to Reproduce
channels.telegram.enabled: trueandplugins.telegram.enabled: truemessageChannel=telegram"stopReason":"error","errorMessage":"Connection error."Expected Behavior
http://localhost:1234/anthropic)Actual Behavior
Diagnostic Evidence
Gateway Logs (plugin enabled, Telegram message sent)
Key observation: Multiple
agent start/endcycles (retry pattern), but no tool calls, no LLM streaming, no HTTP logs.Gateway Logs (plugin disabled, same message via webchat)
Key difference: Tool calls execute, streaming output appears, LLM response generated successfully.
Session History (Telegram messages with plugin enabled)
{ "type":"message", "id":"636c41eb", "parentId":"87ec5414", "timestamp":"2026-02-11T11:13:29.235Z", "message":{ "role":"assistant", "content":[], "api":"anthropic-messages", "provider":"localProxy", "model":"anthropic--claude-4.5-sonnet", "usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}}, "stopReason":"error", "timestamp":1770808407836, "errorMessage":"Connection error." } }Root Cause Hypothesis
When
plugins.telegram.enabled: true, the plugin may be:messageChannel=telegramrunsThe LLM provider call is completely skipped (not failing at HTTP level), suggesting an early return or exception in the agent run preparation phase.
Related Issues
Additional Context
Impact
Request
Please investigate:
channels.telegramandplugins.telegramenabled a supported configuration?messageChannel=telegramprevent LLM provider calls?