google-gemini/gemini-cli

"Failed to persist policy" error despite correct permissions

已關閉

#19,919 建立於 2026年2月22日

 (15 則留言) (0 個反應) (1 位負責人)TypeScript (13,657 個分叉)batch import
area/coreeffort/smallhelp wantedkind/bugpriority/p2status/bot-triagedtype/bug

倉庫指標

星標
 (103,992 顆星)
PR 合併指標
 (平均合併 4天 2小時) (30 天內合併 55 個 PR)

描述

What happened?

I am receiving the error "✕ Failed to persist policy for run_shell_command" when selecting "allow for all future sessions". I have verified the following: 1. Permissions: The directory ~/.gemini/policies is writable by my user. 2. Configuration: settings.json has "enablePermanentToolApproval": true. 3. File State: The auto-saved.toml file exists, is valid TOML, and is not locked by other processes. This appears to be an internal issue with the CLI's persistence logic or sandboxing constraints preventing the write operation. System: Linux (aarch64)

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

What did you expect to happen?

preference stored

Client information

  • CLI Version: 0.29.5
  • Git Commit: 2ef872e73
  • Session ID: 824fa46c-018a-4ba6-b765-1f305fd73dc6
  • Operating System: linux v22.21.1
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3-pro-preview
  • Auth Type: oauth-personal
  • Memory Usage: 1.04 GB
  • Terminal Name: Unknown
  • Terminal Background: #0c0c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

貢獻者指南