使用 pwsh 打开 codex-cli,AI 在调用 powershell 工具链的时候可能会报错:
windows sandbox: runner error: CreateProcessAsUserW failed
并且在修改 config.toml 配置后无果:
[windows]
sandbox = "unelevated"
解决方式:
如果你安装过微软商店中下载的 powershell7,需要先卸载,然后再安装官方 msi 版本:
# 卸载微软商店中的 powershell7
winget uninstall --id Microsoft.PowerShell --exact
# 安装官方 msi 应用程序
winget install --id Microsoft.PowerShell --source winget --installer-type wix --scope machine
注意:官方 msi 的安装包位于 github 中,所以可能需要科学上网。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END









暂无评论内容