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.
Related documentation
Debug CLI command reference
Gathers information about your local Sanity environment.
Init CLI command reference
Initialize a new Sanity project or plugin
Hooks CLI command reference
Interact with hooks in your project
Schemas CLI command reference
List, validate, extract, and deploy schema.
Datasets CLI command reference
Interact with datasets in your project
Backups CLI command reference
Reference documentation for the sanity backups CLI command.
Migrations CLI command reference
Create, list, and run content migrations