Skip to content

Handle stale duplicate permission prompts from OpenCode #182

Description

@hcsum

Hi, thanks for the project! I have been using this bot for the pass few days, and it worked great.

Here is an issue I found:
OpenCode can emit duplicate equivalent permission requests for concurrent tool calls. I opened an upstream issue with details here:

anomalyco/opencode#36055

In the Telegram bot, this shows up as a confusing stale-button UX:

  1. The bot renders two identical permission prompts.
  2. I click always on the first one.
  3. When I continue the session, the bot still appears blocked by the second prompt.
  4. Clicking always on the second prompt fails with Permission request not found.
  5. The session can continue afterwards, but the UX is confusing.

Could the bot handle this case more gracefully, for example by coalescing equivalent pending prompts, disabling stale duplicate buttons, or treating Permission request not found from a stale prompt as a stale UI state instead of a user-visible error?

This may be an upstream OpenCode issue rather than a bot-side bug, but the Telegram UI currently exposes the stale duplicate prompt very directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions