Skip to content

Fix response streaming and add immediate ack for long-running tasks #12

Closed

Description

@sentry-junior

Summary

Two related UX regressions in the assistant response pipeline: (1) responses are fully buffered before being sent to Slack instead of streaming tokens progressively, and (2) there is no immediate acknowledgement message when a task will take more than a few seconds, leaving users in a silent wait.

Problem

  • Streaming: The Slack response is sent as a single payload after the full LLM response completes, not as incremental token chunks. Users see nothing until the entire response is ready.
  • Long-task ack: For tasks that take >2-3s (e.g. GitHub issue creation, web search + synthesis), no message is sent upfront. The assistant just goes quiet.

Impact

  • Silent gaps of 5-15+ seconds on complex tasks feel like failures or timeouts.
  • Buffered streaming negates one of the main perceived benefits of LLM UX.
  • Affects every assistant invocation; high surface area.

Evidence

Root Cause Hypotheses

  • Streaming: Assistants API may not be enabled, or SSE chunks are being accumulated before the Slack / loop is wired up. ( confidence)
  • Long-task ack: No pre-flight call before dispatching tool chains. ( confidence)

Tentative Fix Options

  • Streaming: Enable SSE streaming on the completions call; open a Slack message with an empty/placeholder body, then patch it via on each delta chunk (or batch at reasonable intervals to avoid rate limits).
  • Ack: Before any tool dispatch expected to take >2s, post an immediate ephemeral or visible "on it..." message using ; update it in-place when done.

Acceptance Criteria

  • First visible text appears in Slack within ~1s of LLM starting to generate.
  • Any task involving ≥1 tool call sends an ack message before tool execution begins.
  • Ack message is updated in-place with the final result (no orphaned "on it" messages).
  • No regression on short/fast responses that don't need ack.

Risks

  • Slack rate limits on — mitigation: batch updates at 250-500ms intervals, not every token.

Activity

  1. added a commit that references this issue on Feb 28, 2026
    35a020b
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions