Skip to content

[BUG]: tool execution hangs when custom events are off #229

Description

@gjanco

With AURA_CUSTOM_EVENTS off (the default), the web server still subscribes every request to the tool event broker (handlers.rs:517-520), but the SSE loop's consumer arms are guarded by emit_custom_events and never polled (streaming/handlers.rs:219,245,304). Publishers are unconditional, so the per-request channel (cap 32) fills and the next send blocks the tool-execution path forever.

Reproduced on main 2026-07-17 with a single-agent config against a mock MCP server. A request with 15 tool calls completes (30 events buffered under the cap). A request with 25 tool calls wedges permanently at the 33rd send, and the stream stays silent from 18.8s onward. The same query with events on completes in 31s. Threshold is about 17 MCP tool calls per request (tool_start plus tool_complete per call).

Scope note: orchestration mode never engaged this broker in testing (0 publishes across 20 worker tool calls), so this is the single-agent path.

Activity

  1. Shearerbeard commented on Jul 17, 2026

    @Shearerbeard
    Collaborator

    Confirmed with a live repro on main (2026-07-17). Single-agent config, mock MCP, AURA_CUSTOM_EVENTS unset (the default). A request with 15 tool calls completes fine: 30 events buffered under the tool-event channel's cap of 32. A request with 25 tool calls wedges permanently. The 33rd send blocks forever because the SSE loop's consumer arms are guarded by emit_custom_events and never polled; the stream went silent at 18.8s and never recovered. Running the identical query with events on completed normally in 31s. Threshold is roughly 17 MCP tool calls in one request (2 broker events per call). One scope note: orchestration mode never engaged this broker in testing (0 publishes across 20 worker tool calls), so this is a single-agent path bug. Description updated with the mechanism and repro.

  2. changed the title [-]Channel subscription gating[/-] [+]Single Agent tool broker overlows[/+] on Jul 17, 2026
  3. changed the title [-]Single Agent tool broker overlows[/-] [+][BUG]: tool execution hangs when custom events are off[/+] on Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions