You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Events API requests are acknowledged right away, since there's no data expected
// Except function_executed events since ack can be handled by the user
awaitack();
Purpose
I use the socket mode client (@slack/socket-mode) for development in the multiple environments. My client sends an ack only if the message is for the corresponding environment.
For example,
For the permanent environment, the client sends an ack if it receives a message without any prefix. e.g., @app Hello
For an ephemeral environment, the client sends an ack if it receives a message with the prefix. e.g., [pr-123] @app Hello
In my experience, we should not use this pattern for permanent environments, because it causes a message delay. Slack retries to send a message until any client sends an ack.
I think this pattern is still useful if we want to test the client in an ephemeral environment.
Yess providing more control over the behavior of ack in Bolt could be beneficial for many use cases. We are considering improving this area in future major releases of the project
There is the processBeforeResponse options that some receivers offer, that allow ack to be invoked after your handler executes but socket mode does not offer it
For your use case it may be more efficient to create multiple Slack apps that use the same source code configure them for each specific environment, this would also eliminate the latency caused by the retries
Activity
WilliamBergamin commentedon Feb 16, 2026
👋 Hi @int128 thanks for writing it 💯
Yess providing more control over the behavior of
ackin Bolt could be beneficial for many use cases. We are considering improving this area in future major releases of the projectThere is the
processBeforeResponseoptions that some receivers offer, that allowackto be invoked after your handler executes but socket mode does not offer itFor your use case it may be more efficient to create multiple Slack apps that use the same source code configure them for each specific environment, this would also eliminate the latency caused by the retries