npm / @slack/bolt
@slack/bolt
What changed in @slack/bolt 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
30 breaking1 security2 deprecations15 new APIs and options3 behavior and defaults1 tooling10 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@slack/bolt 524 changes
Breaking changes 13
HTTPReceiver and ExpressReceiver reject request bodies larger than 4 MB by default with HTTP 413 before buffering; apps can configure bodyLimit to allow larger payloads or disable the limit.
app.function() is now the sole way to handle custom function executions, providing complete() and fail() callbacks and an inputs property.
When no logger option is provided, the default receiver shares the same Logger instance as app.logger, so changing its level after construction affects receiver-side logging too.
The app.step() method has been deleted; use app.function() with custom functions instead.
The agent option is removed; use clientOptions.fetch to provide a custom fetch implementation for proxy or TLS needs.
The clientTls option is removed; use clientOptions.fetch to provide a custom fetch implementation for proxy or TLS needs.
The unused trailing callback parameter is removed from the AwsHandler type.
The minimum required runtime is Node.js 20; npm must be at least 9.6.4.
The minimum npm version is now 9.6.4.
respond() uses native fetch for response_url calls, throws RespondError for non-2xx responses, and resolves to a Response on success instead of an axios response object.
SocketModeReceiver accepts an undici-compatible Dispatcher instance for unified proxy and TLS configuration of WebSocket connections and HTTP API calls.
The deprecated WorkflowStep class and its associated types, middleware, and utilities are removed. Use CustomFunction and app.function() instead.
The WorkflowStepEdit type has been deleted; remove imports and use app.function() with custom functions instead.
Deprecations 1
The legacy AwsCallback export is retained and marked deprecated.
New APIs and options 4
Use clientOptions.fetch to provide a custom fetch implementation for proxy or TLS needs.
context_enterprise_id is added as an optional field for envelopes delivered for Slack Connect channels and Enterprise Grid org-wide apps.
context_team_id is added as an optional field so typed code can route events by the correct workspace.
A dispatcher option is added for proxy or TLS configuration in socket mode.
Behavior and default changes 2
Default error handlers log richer details for web-api errors, including API error codes, rate limit durations, and HTTP status codes, alongside the full error object.
Errors thrown by the internal WebClient are now proper Error subclasses, enabling instanceof-based error handling.
Tooling 1
TypeScript projects targeting an older ECMAScript library may fail to build; the notes recommend raising the compilation target to es2022 or later.
Fixes and other changes 3
The type now allows null, matching AWS API Gateway payloads and APIGatewayProxyEvent so events can be passed directly to an AwsLambdaReceiver handler without a type error.
Authorization errors are now wrapped in AuthorizationError, preserving the original thrown value; non-Error rejections are retained via the wrapped original's cause.
toHandler() returns a 2-argument promise-based function, preventing startup failure on AWS Lambda Node.js 24+.
@slack/bolt 438 changes
Breaking changes 17
Empty signingSecret values are rejected at initialization to prevent accidental HMAC signature forgery.
authed_teams is removed from the event payload envelope.
authed_users is removed from the event payload envelope.
The interface is now a union of API Gateway v1 and v2 payload structures; TypeScript users may need to test properties to narrow the payload version.
Apps using ExpressReceiver now use express v5 and may need to account for its breaking changes.
The deprecated method has been removed.
The src/receivers/http-utils.ts module is removed.
Pass this built-in middleware directly rather than invoking it to return a middleware.
The deprecated type has been removed.
Bolt 4 requires Node 18 or later, so applications using Node 14 or 16 must upgrade their runtime.
Bolt 4 requires npm 8.6.0 or later.
The render-html-for-install-path module is removed.
Bolt upgrades Socket Mode from v1 to v2; applications with custom code attached to SocketModeReceiver may need to account for migration changes.
Bolt upgrades its Web API client from v6 to v7; TypeScript applications may encounter compilation issues from the client changes.
The class is no longer the way to access its single static handler; import the handler directly instead.
@slack/typesis no longer re-exported without a namespace; access its types through the namedtypesexport.The deprecated type has been removed.
Security 1
Only the exact value ssl_check=1 bypasses signature verification, preventing truthy but incorrect values from skipping authentication checks.
Deprecations 1
A variety of related methods, constants, and types are deprecated and will be removed in Bolt 5.
New APIs and options 11
App options can configure the client ping timeout for Socket Mode.
App options can enable ping-pong logging for Socket Mode.
App options can configure the server ping timeout for Socket Mode.
respond accepts thread_ts so a response can be published in a thread.
Listeners for app.event and app.message can use sayStream to send streaming messages.
Listeners can use setStatus to show loading status when required event details are available.
The complete and fail utility gains hasBeenCalled.
Bolt adds support for work objects.
A new Assistant class lets developers create an Agent or Assistant by including callbacks and adding it to an App instance.
The handler is now available as a direct named export instead of through the SocketModeFunctions class.
Bolt now exports
@slack/web-apiunder thewebApinamespace so applications can use the package version bundled with Bolt.
Behavior and default changes 1
The acknowledgment timeout is extended for function executed events.
Fixes and other changes 7
Corrects the code associated with InvalidCustomPropertyError.
Fixes promise handling in MemoryStore.
An edge case involving an error during authorize was fixed.
Named exports have improved ESM compatibility.
Optional chained parameters are anticipated as undefined when parsing event details.
Apps with no registered handlers no longer log an error about not acknowledging an incoming event in time.
Middleware argument types now conditionally intersect in event-specific utilities, avoiding properties such as
sayormessagebeing required with typeundefinedfor unrelated payloads.