block / block/buzz

[Bug] Agent reply in one thread can remain stalled after another thread event is processed

Open
#2,865 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Description

When the same managed agent receives requests in two separate threads around the same time, the reply to the first thread can remain stalled without any visible error.

In the observed test, the agent successfully replied in Thread B, but did not reply in Thread A until it was mentioned again in Thread A.

## Steps to reproduce

1. Add the same managed agent to a channel.
2. In Thread A, mention the agent and ask it to calculate the sum of the integers from 1 to 100, then reply only in Thread A using the identifier `THREAD-A`.
3. Before the agent replies in Thread A, mention the same agent in Thread B and ask it to calculate the sum of the integers from 1 to 50, then reply only in Thread B using the identifier `THREAD-B`.
4. Observe the replies in both threads.
5. If Thread A remains unanswered, mention the agent again in Thread A.

## Actual behavior

- The agent replied successfully in Thread B.
- Thread A remained unanswered for several minutes.
- No failure, cancellation, or retry state was displayed.
- After another mention in Thread A, the agent returned the expected answer to the original request.

Observed timeline:

- 01:57 - Request posted in Thread A
- 01:57 - Request processed and answered in Thread B
- 02:00 - Thread A was still unanswered, and the agent was mentioned again
- 02:01 - The agent answered the original Thread A request

## Expected behavior

Both requests should eventually receive responses.

If a request is interrupted, cancelled, or fails, Buzz should display an explicit error or retry state rather than silently leaving the thread unanswered.

## Additional information

After being mentioned again, the agent claimed that it had moved to another event before completing the pending reply. This statement was generated by the agent and should not be treated as evidence of the internal cause.

The confirmed observations are only:

1. Thread B received a reply.
2. Thread A did not receive a reply.
3. Thread A received the original answer only after another mention.

The problem may relate to event scheduling, cancellation, queueing, or turn-resumption behavior, but the internal cause has not been verified.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two-thread sequence described in the issue, then trace the event scheduling, cancellation, queueing, and turn-resumption paths involved when the same managed agent handles both requests. Done means both threads receive responses, or an interrupted request shows an explicit error or retry state instead of remaining silent.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.