Bug Description
event.thread.post(asyncIterable) works in normal Slack message handlers, but fails in Slack action handlers with team_not_found.
** Disclaimer ** - Report generated by Codex but verified manually 2 times by me personally on noticed behaviour
Steps to Reproduce
Minimal repro
bot.onAction("approve", async (event) => {
const stream = (async function* () {
yield "Hello";
yield " world";
})();
await event.thread?.post(stream);
});
The same event.thread works for plain text:
bot.onAction("approve", async (event) => {
await event.thread?.post("Approval received");
});
And streaming works fine in normal message contexts:
bot.onNewMention(async (thread) => {
const stream = (async function* () {
yield "Hello";
yield " world";
})();
await thread.post(stream);
});
Observed error
Slack returns:
An API error occurred: team_not_found
What seems to be happening
From the built SDK code:
- ThreadImpl.handleStream() derives Slack stream options from this._currentMessage.raw
- it sets:
- recipientUserId = this._currentMessage.author.userId
- recipientTeamId = raw?.team_id ?? raw?.team
In action callbacks, event.thread is created from the interactive payload, not a normal Slack message payload.
For Slack interactive payloads, raw.team is an object like:
{ "id": "T123", "domain": "..." }
not the team id string.
So the streaming path appears to pass raw.team instead of raw.team.id as recipient_team_id, which causes Slack native streaming to fail with team_not_found.
Expected Behavior
Expected behavior
event.thread.post(asyncIterable) should work in onAction(...) the same way it works in onNewMention(...) / onSubscribedMessage(...).
Actual Behavior
Does not behaviour
Code Sample
Chat SDK Version
4.23.0
Node.js Version
No response
Platform Adapter
Slack
Operating System
macOS
Additional Context
No response
Bug Description
event.thread.post(asyncIterable) works in normal Slack message handlers, but fails in Slack action handlers with team_not_found.
** Disclaimer ** - Report generated by Codex but verified manually 2 times by me personally on noticed behaviour
Steps to Reproduce
Minimal repro
bot.onAction("approve", async (event) => {
const stream = (async function* () {
yield "Hello";
yield " world";
})();
});
The same event.thread works for plain text:
bot.onAction("approve", async (event) => {
await event.thread?.post("Approval received");
});
And streaming works fine in normal message contexts:
bot.onNewMention(async (thread) => {
const stream = (async function* () {
yield "Hello";
yield " world";
})();
});
Observed error
Slack returns:
An API error occurred: team_not_found
What seems to be happening
From the built SDK code:
In action callbacks, event.thread is created from the interactive payload, not a normal Slack message payload.
For Slack interactive payloads, raw.team is an object like:
{ "id": "T123", "domain": "..." }
not the team id string.
So the streaming path appears to pass raw.team instead of raw.team.id as recipient_team_id, which causes Slack native streaming to fail with team_not_found.
Expected Behavior
Expected behavior
event.thread.post(asyncIterable) should work in onAction(...) the same way it works in onNewMention(...) / onSubscribedMessage(...).
Actual Behavior
Does not behaviour
Code Sample
Chat SDK Version
4.23.0
Node.js Version
No response
Platform Adapter
Slack
Operating System
macOS
Additional Context
No response