Skip to content

Discord: failed to create thread when thread already exists for message #388

@BlakeHung

Description

@BlakeHung

Parent: #382

Problem

When a user sends a message that already has a thread created (e.g. from a previous bot interaction or manual thread), openab attempts to create a new thread and fails with:

ERROR openab::discord: failed to create thread: A thread has already been created for this message

The error is not handled gracefully — the bot silently fails to respond.

Steps to reproduce

  1. Send a message to the bot in a channel
  2. If the bot crashes or restarts, send the same message again (or a message that already has a thread)
  3. Observe failed to create thread error in logs
  4. Bot does not respond

Expected behavior

If a thread already exists for the message, the bot should reuse the existing thread instead of trying to create a new one.

Environment

  • openab 0.7.7 (main HEAD 723d963)
  • Backend: claude-agent-acp
  • Discord adapter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions