#21218: fix(slack): pass recipient_team_id and recipient_user_id to chat stre…
channel: slack
size: XS
Cluster:
Block Streaming Enhancements
…aming
The Slack chat.startStream API requires recipient_team_id and recipient_user_id when streaming in channels. Without these parameters the stream fails with "missing_recipient_team_id" or "missing_recipient_user_id" errors, causing the bot to silently drop channel replies.
## Summary
Describe the problem and fix in 2–5 bullets:
- Problem:
- Why it matters:
- What changed:
- What did NOT change (scope boundary):
## Change Type (select all)
- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Docs
- [ ] Security hardening
- [ ] Chore/infra
## Scope (select all touched areas)
- [ ] Gateway / orchestration
- [ ] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [x] Integrations
- [ ] API / contracts
- [ ] UI / DX
- [ ] CI/CD / infra
## Linked Issue/PR
- Closes #
- Related #
## User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write `None`.
## Security Impact (required)
- New permissions/capabilities? (`No`)
- Secrets/tokens handling changed? (`No`)
- New/changed network calls? (`No`)
- Command/tool execution surface changed? (`No`)
- Data access scope changed? (`No`)
- If any `Yes`, explain risk + mitigation:
## Repro + Verification
### Environment
- OS:
- Runtime/container:
- Model/provider:
- Integration/channel (if any): Slack (channel, no DM)
- Relevant config (redacted):
### Steps
1. Send a message to the bot in a Slack channel (not a DM)
2. Observe the bot attempting to reply via streaming
3.
### Expected
- The bot streams its response in real time in the thread
### Actual
- chat.startStream fails with missing_recipient_team_id, fallback delivery kicks in (or reply is dropped entirely)
## Evidence
Attach at least one:
- [ ] Failing test/log before + passing after
- [x] Trace/log snippets
- [ ] Screenshot/recording
- [ ] Perf numbers (if relevant)
## Human Verification (required)
What you personally verified (not just CI), and how:
- Verified scenarios:
- Edge cases checked:
- What you did **not** verify:
## Compatibility / Migration
- Backward compatible? (`Yes`) teamId and userId are optional; if absent, behavior is identical to before
- Config/env changes? (`No`)
- Migration needed? (`No`)
- If yes, exact upgrade steps:
## Failure Recovery (if this breaks)
- How to disable/revert this change quickly: git revert 05c33b297 - streaming falls back to normal delivery
- Files/config to restore: chat.startStream errors in logs, non-streamed replies
- Known bad symptoms reviewers should watch for:
## Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write `None`.
- Risk:
- Mitigation:
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds `recipient_team_id` and `recipient_user_id` parameters to Slack's `chat.startStream` API call to fix "missing_recipient_team_id" and "missing_recipient_user_id" errors when streaming in channels. The fix passes `ctx.teamId` and `message.user` to the stream initialization in `dispatch.ts:197-204`.
<h3>Confidence Score: 4/5</h3>
- Safe to merge - addresses a specific API requirement with minimal risk
- The changes correctly implement required Slack API parameters for streaming in channels. The fix is narrowly scoped to the streaming functionality and uses existing context values. The conditional parameter passing protects against missing values. Minor concern about the `|| undefined` pattern potentially hiding empty string values, but `ctx.teamId` is typed as required string.
- No files require special attention
<sub>Last reviewed commit: 05c33b2</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#20623: fix(slack): duplicate replies and missing streaming recipient params
by rahulsub-be · 2026-02-19
88.3%
#21754: slack: pass inbound team_id into stream routing and startStream
by AIflow-Labs · 2026-02-20
86.0%
#22096: fix(slack): traverse .original for Slack SDK errors; pass recipient...
by maiclaw · 2026-02-20
84.3%
#11608: feat(slack): native streaming, Block Kit blocks, tool-aware status
by joshdavisind · 2026-02-08
80.7%
#19673: fix(telegram): avoid starting streaming replies with only 1-2 words
by emanuelst · 2026-02-18
79.5%
#20244: resolution in DM with replyToMode=all
by saurav470 · 2026-02-18
78.1%
#20479: fix(slack): keep replies flowing for oversized file uploads
by olyashok · 2026-02-19
77.5%
#17316: fix: ack reaction not removed when block streaming is enabled (Tele...
by czmathew · 2026-02-15
77.1%
#20274: fix: add fallback delivery when stopSlackStream fails
by nova-openclaw-cgk · 2026-02-18
77.0%
#8684: fix(slack): add title param and channel resolution for file upload
by shuans · 2026-02-04
77.0%