#19981: feat(matrix): enable block streaming
docs
channel: matrix
gateway
size: XS
Cluster:
Block Streaming Enhancements
### Summary
Enable block streaming for the Matrix channel. Messages are sent in blocks as the assistant generates them, reducing perceived latency for long replies.
### Changes
- Set `blockStreaming: true` in Matrix channel capabilities
- Add `blockStreamingCoalesceDefaults` (`minChars: 1500`, `idleMs: 1000`) matching Signal/Slack/Discord defaults
- Update docs: `matrix.md`, `streaming.md`, `configuration-reference.md`
### How it works
Block streaming sends completed text blocks as separate messages while the model is still generating. The coalescer merges small chunks (< 1500 chars) and flushes after 1s idle. No runtime code changes needed — the core block-streaming pipeline already supports any channel that declares the capability.
Users enable it via:
```json5
{ agents: { defaults: { blockStreamingDefault: "on" } } }
```
### Testing
- TypeScript: compiles clean (zero errors)
- Unit tests: 28/28 matrix extension tests pass (no regression)
- Live tested on Matrix (Synapse homeserver + Element client)
- Staging gateway boot tested with config enabled
### Related
- Continuation of block streaming work from #12709 (@emonty)
- Docs reference: [Streaming and Chunking](/concepts/streaming)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Enables block streaming for the Matrix channel by declaring `blockStreaming: true` in capabilities and setting `blockStreamingCoalesceDefaults` (`minChars: 1500`, `idleMs: 1000`) to match Signal/Slack/Discord/Google Chat defaults. No runtime code changes were needed — the core block-streaming pipeline already supports any channel that declares these settings, and the Matrix message handler already uses `createReplyDispatcherWithTyping` + `dispatchReplyFromConfig` which integrate with block streaming automatically.
- `extensions/matrix/src/channel.ts`: Added `blockStreaming: true` to capabilities and `streaming.blockStreamingCoalesceDefaults` config
- `docs/channels/matrix.md`: Added block streaming to capabilities table, new "Streaming" section with global and per-channel config examples
- `docs/concepts/streaming.md`: Added Matrix to the list of channels with 1500-char coalesce default
- `docs/gateway/configuration-reference.md`: Added Matrix to the list of channels with 1500-char coalesce default
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it adds a declarative capability flag and coalesce defaults with no runtime code changes.
- The change is minimal and purely declarative: two config properties added to the Matrix channel plugin matching the exact same pattern and values used by Signal, Slack, Discord, and Google Chat. The core block-streaming pipeline already handles channels that declare these settings. Documentation updates are consistent and accurate. All 28 Matrix extension tests pass per the PR description.
- No files require special attention.
<sub>Last reviewed commit: 6de6b5b</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#11608: feat(slack): native streaming, Block Kit blocks, tool-aware status
by joshdavisind · 2026-02-08
72.1%
#16940: fix(matrix): send voice messages as native voice bubbles
by zerone0x · 2026-02-15
72.1%
#6518: feat(matrix): add inbound message debouncing
by Klowalski · 2026-02-01
71.3%
#18718: matrix: add pending group history context for room messages
by pharasyte · 2026-02-17
71.2%
#13057: feat(matrix): add sessionScope=room to route sessions by roomId
by spengrah · 2026-02-10
69.6%
#13026: matrix: optionally include media metadata in message.read
by yamoroc · 2026-02-10
69.6%
#20025: Fix Matrix messages silently dropped due to zero startup grace
by Clawborn · 2026-02-18
68.4%
#14227: fix(matrix): pass asVoice to audioAsVoice for native voice messages
by tfm-neo-ai · 2026-02-11
68.4%
#10313: fix(matrix): fallback to authenticated media download (Matrix v1.11+)
by iter-next · 2026-02-06
68.3%
#20244: resolution in DM with replyToMode=all
by saurav470 · 2026-02-18
67.9%