Problem
Inline keyboard buttons sent by custom skills (e.g. earbot: prefix) are received by the backend but silently dropped. The callback handler in src/channels/telegram/agent.rs only recognizes specific hardcoded prefixes (followup:, setup:, provider:, model:, allm:, session:, q:, cd:sel:, cd:pg:, prof:*, plan:*, approve:/always:/yolo:/deny:). Unrecognized prefixes fall through without:
- Calling
answer_callback_query (button shows infinite loading spinner until Telegram timeout)
- Routing the callback data to the agent as a message turn (skill never sees the user's tap)
Evidence (from logs)
20:29:44.199 INFO Telegram callback query received: data=earbot:C
20:29:44.199 WARN Telegram: unknown callback data: earbot:C
20:29:45.087 INFO Telegram callback query received: data=earbot:E
20:29:45.087 WARN Telegram: unknown callback data: earbot:E
20:29:45.762 INFO Telegram callback query received: data=earbot:G
20:29:45.762 WARN Telegram: unknown callback data: earbot:G
20:29:46.418 INFO Telegram callback query received: data=earbot:F
20:29:46.418 WARN Telegram: unknown callback data: earbot:F
All 4 button taps received, all silently dropped. User saw infinite spinner on each tap.
Impact
- Any skill that sends inline buttons with custom callback_data will have non-functional buttons
- This blocks the earbot skill demo and any future skill that needs interactive inline keyboards
- Users get zero feedback (spinner forever) which looks like a bug
Proposed Fix
Two-part:
1. Catch-all answer_callback_query (immediate UX fix)
At the end of the callback data chain in agent.rs, add a catch-all that calls answer_callback_query with an empty response so the spinner is dismissed. At minimum this gives users feedback that the tap was received.
2. Route unrecognized callbacks to agent as synthetic messages (proper fix)
For callback data that doesn't match any built-in prefix, inject it as a synthetic user message (e.g. [callback:earbot:C]) into the agent turn. This lets skills handle their own button taps without the core needing to know about every prefix.
Files
src/channels/telegram/agent.rs (callback handler chain, ~line 259-1372)
Problem
Inline keyboard buttons sent by custom skills (e.g.
earbot:prefix) are received by the backend but silently dropped. The callback handler insrc/channels/telegram/agent.rsonly recognizes specific hardcoded prefixes (followup:,setup:,provider:,model:,allm:,session:,q:,cd:sel:,cd:pg:,prof:*,plan:*,approve:/always:/yolo:/deny:). Unrecognized prefixes fall through without:answer_callback_query(button shows infinite loading spinner until Telegram timeout)Evidence (from logs)
All 4 button taps received, all silently dropped. User saw infinite spinner on each tap.
Impact
Proposed Fix
Two-part:
1. Catch-all answer_callback_query (immediate UX fix)
At the end of the callback data chain in agent.rs, add a catch-all that calls
answer_callback_querywith an empty response so the spinner is dismissed. At minimum this gives users feedback that the tap was received.2. Route unrecognized callbacks to agent as synthetic messages (proper fix)
For callback data that doesn't match any built-in prefix, inject it as a synthetic user message (e.g.
[callback:earbot:C]) into the agent turn. This lets skills handle their own button taps without the core needing to know about every prefix.Files
src/channels/telegram/agent.rs(callback handler chain, ~line 259-1372)