Fixes Next.js session management and multiple bugfixes and improvements
Published: March 24, 2026
v5.18.0
This release fixes critical issues with authentication persistence in Next.js, session management errors, and the @mention dropdown functionality, while also improving performance by reducing unnecessary API requests.
π Notable bugfixes and improvements
- Adds a workaround for a bug where session was not persisted across reloads in studios embedded in Next.js, and would result in an error message
Session with sid (β¦) not found. - Reduces number of requests with tag
sanity.studio.history-revisionafter editing documents. - Restores the behavior where asset sources receive the current asset in
selectedAssetswhen opened via the browse flow, even when the field already has a value. - Fixes an issue causing authentication to not persist between page reloads in Next.js.
- Fixes an issue where the
@mentiondropdown in comments might show βNo users foundβ when anysystem.groupdocument hadmembers: null. - Fixes virtualization issues using the dialog and
renderDefault.
CLI bugfixes and improvements
- The
debugcommand has an improved output format and can now be run outside a project. inithas improve flags.- Many commands now has plural names, with aliases for the singular versions.
- Deprecated
startcommand. Usepreviewinstead. - Adds support for non-interactive mode for app templates.
- Load all env vars for schema extract.
- Prevent duplicate deprecation warnings during
sanity deploy. - Schema extract path always appends
schema.json. - Fixes an issue where import command required
--tokenflag.