Skip to content

fix: shorten telegram switch callbacks#195

Merged
HonestMajority merged 1 commit into
mainfrom
fix-telegram-agent-switch-tokens
May 20, 2026
Merged

fix: shorten telegram switch callbacks#195
HonestMajority merged 1 commit into
mainfrom
fix-telegram-agent-switch-tokens

Conversation

@HonestMajority
Copy link
Copy Markdown
Owner

Summary

  • Replace /ls inline-keyboard callback payloads with deterministic short sw:<token> values derived from agent ids.
  • Resolve switch tokens statelessly by recomputing relative_agent_list for the current Telegram agent before switching.
  • Return a clear stale-list message when a token no longer resolves.

Root Cause

Telegram limits callback_data to 64 bytes. The previous /ls buttons used switch:<full-agent-id>, so long project/task agent IDs were truncated before the callback handler saw them, causing valid agents to be rejected as unknown.

Scope

Kept target parsing, inbox layout, send-message routing, voice routing, and reply-tag routing unchanged.

Verification

  • cargo fmt --check
  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • Researcher telegram-agent-routing approved commit f978bb2 before PR creation.

@HonestMajority HonestMajority merged commit 99bdc61 into main May 20, 2026
1 check passed
@HonestMajority HonestMajority deleted the fix-telegram-agent-switch-tokens branch May 20, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant