Repository navigation
Closed as not planned
Description
Summary
Junior currently buffers the full LLM response before posting it to the Slack thread. This produces a dead UX where users stare at nothing until the entire answer arrives, then it dumps all at once. Streaming would post incremental updates as tokens arrive, so users see progress immediately.
Current Behavior
- LLM response is fully buffered before any Slack message is sent.
- Users experience no feedback for the full duration of inference (can be 10-30+ seconds for longer responses).
- The complete message appears atomically once generation finishes.
Gap / Opportunity
- Streaming makes the bot feel significantly more responsive and interactive.
- Users can start reading and context-switching earlier, improving perceived latency.
- It aligns with how modern AI chat products (ChatGPT, Claude.ai) behave.
Prior Art
- Slack supports in-place message editing via
chat.update, which is the standard pattern for simulating streaming: post a placeholder, then repeatedly update it as tokens arrive. - Vercel AI SDK Slackbot template demonstrates this pattern: post initial message → stream tokens → call
chat.updateon a throttled cadence to avoid rate limits. - bolt-js community has tracked this need (Slack - Support of LLM streaming slackapi/bolt-js#2073); common solution is a debounced update loop driven by the LLM stream.
Options
- Option A – Debounced
chat.updateloop: Post placeholder on first token, accumulate streamed tokens, flush to Slack every ~500ms or N tokens. Simple; handles rate limits naturally. - Option B – Chunk-batched updates: Buffer N tokens per update (e.g. 50 tokens), call
chat.updateper batch. Predictable cadence; slightly choppier UX than Option A. - Option C – Socket Mode + streaming: If junior uses Socket Mode, combine with Option A for lower-latency delivery with no HTTP timeout risk.
Recommended Direction
Option A (debounced chat.update loop) — easiest to implement, naturally self-throttles against Slack's Tier 3 rate limit (~50 req/min per channel), and matches the dominant pattern in the ecosystem.
Acceptance Criteria
- Users see a partial message appear within ~1s of LLM generation starting.
- Message content updates progressively as tokens stream in.
- Final message state matches full LLM output with no dropped tokens.
-
chat.updatecall rate stays within Slack API tier limits (noratelimitederrors under normal usage).
Risks
- Slack
chat.updaterate limits (Tier 3: ~50 req/min per channel) — mitigated by debouncing at ≥500ms intervals. - Partial message edits can look jarring mid-sentence — acceptable tradeoff for responsiveness.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ref(agent): Reduce streaming integration surface area
dcramer commentedon Feb 27, 2026
Actually this is working, i think it was just not obvious because it didnt stream until it was done.