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
Search the existing issues, especially the pinned issues.
Exception report
Oops, something went wrong.Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yamlThank you!### EnvironmentPSReadLine: 2.4.5PowerShell: 7.6.8OS: macOS 26.7.1BufferWidth: 80BufferHeight: 24Last 0 Keys:### ExceptionSystem.IO.IOException: The system cannot open the device or file specified. : 'PSReadLineHistoryFile_3549844812'. One or more system calls failed: lstat("", ...) == -1; errno == ENOENT; at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, NamedWaitHandleOptionsInternal options, Boolean& createdNew) at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name) at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize() at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics) at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Screenshot
Environment data
PS Version: 7.6.8PS HostName: ConsoleHostPSReadLine Version: PSReadLine EditMode: EmacsOS: Darwin dm-XXXXX 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:53 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6030 arm64BufferWidth: 114BufferHeight: 59
Steps to reproduce
run "sudo pwsh" in the terminal
Expected behavior
No exception
Actual behavior
Exception, PSReadLine does not work, has to be removed with "Remove-Module PSReadLine" to be able to use pwsh
### Environment
PSReadLine: 2.4.5
PowerShell: 7.6.9
OS: macOS 27.0.1
BufferWidth: 240
BufferHeight: 60
Last 0 Keys:
### Exception
System.IO.IOException: The system cannot open the device or file specified. : 'PSReadLineHistoryFile_2106025907'. One or more system calls failed: lstat("", ...) == -1; errno == ENOENT;
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, NamedWaitHandleOptionsInternal options, Boolean& createdNew)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Activity
michael-yi-wang commentedon Oct 26, 2026
I am having the same issue.