Skip to content

ask_user fails with BUTTON_DATA_INVALID for options over 64 bytes of callback_data #908

Open

Description

@alex-mextner

What

On 2026-10-31 around 12:57 UTC (production revision bb7a9d4) ask_user put long option text into callback_data; Telegram limits it to 64 bytes and rejected the keyboard with BUTTON_DATA_INVALID. Options that do not fit must be delivered as ai_opt index buttons resolved from the tapped message keyboard.

Why (motivation)

Clarifying questions with long options must work.

User impact

A person asking the assistant to do something never saw the clarifying question, the request silently failed, and they had to rephrase it without knowing why.

Cost of inaction

Every long-option question keeps failing and users lose their request.

Acceptance criteria

  • An ask_user question with options longer than 64 bytes is delivered with tappable buttons
  • A tap on a long option reaches the model with the full option text
  • After the merge, production reports the merged revision and a live or stage check shows a long ask_user button tapped and answered

Screenshots

(none)

Deploy

Deployed: no

Links

Skipped gates

  • duplicate: searched open and closed issues, no match
  • links: names code identifiers, not tracker references
  • post-merge-acceptance: Criteria 1 and 2 are proven by regression tests in PR 940 (ask-user.test.ts, ai-button-answers.test.ts, telegram-sender.test.ts); the hosted PR CI of the exact head and the Stage QA receipt are linked in the PR. Criterion 3 is a live check on the deployed revision (a long ask_user option tapped and answered once in a real conversation), which needs an owner-authorised live test after the merge and cannot be produced by Stage QA, which drives one account with one-line text.
  • screenshots: no UI change

Activity

  1. alex-mextner commented on Nov 4, 2026

    @alex-mextner
    OwnerAuthor

    Shipped: merged via #940.
    Merge commit: 4b2372d
    This does NOT close the ticket — acceptance still needs proof. Run task read #908 for the outstanding criteria, then task check/task done.

  2. alex-mextner commented on Nov 4, 2026

    @alex-mextner
    OwnerAuthor

    Shipped and deployed: PR 940, merge 4b2372d (version 0.3.2). Verified: hosted PR CI green on the exact head (test, type-bans, lint, CodeQL), Stage QA passed 6 cases (run 41776088442), hosted CI/CD run 41777540412 green, and the odroid runs the merge SHA (container image tag, revision label and releases/current.json revision all equal it, /health ok, /ready 'ok (unverified)', no level 50+ log lines since the deploy). Implemented here: ask_user options of any length are sent as ai_opt index buttons (tests in ask-user.test.ts, ai-button-answers.test.ts, telegram-sender.test.ts). NOT verified live: criterion 3, a long ask_user option tapped and answered once in a real conversation. Stage QA drives one account with one-line text and cannot do it, so this stays an owner-authorised live test; the ticket stays open for it. Follow-ups stay open: #910 to #923.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions