[Bug] /chat save command silently fails on invalid tags
What happened?
When using the /chat save command with a tag that is invalid as a filename (e.g., containing path traversal characters like ../), the command fails to save the conversation checkpoint. Despite this failure, the user interface incorrectly displays a success message, such as Conversation checkpoint saved with tag: ../invalid-tag..
What did you expect to happen?
I expected one of two outcomes when providing an invalid tag:
- Validation Error: The command should validate the tag argument before attempting to save. If the tag contains characters that are invalid for a filename, it should reject the input and display an informative error message to the user, such as:
Error: Invalid tag. Only letters, numbers, hyphens, and underscores are allowed.
- Save Failure Notification: If the file writing operation fails for any reason (including an invalid path), the UI should report this failure accurately instead of showing a success message. The expected message would be:
Error: Failed to save conversation with tag "
". Please use a valid filename.
Client information
$ gemini /about
About Gemini CLI
CLI Version 0.1.7
Git Commit 55cc809
Model gemini-2.5-pro
Sandbox no sandbox
OS darwin
Auth Method OAuth
Login information
Google Account.
Anything else we need to know?
No response
I can take a look later today
Found possible duplicate issues:
- #4903: (0.932273681895358)
- #3384: (0.9120098896032522)
- #3523: (0.9098217433584792)
Hi @flowernotfound, i believe this issue has been fixed. I'm going to close this for now, but please feel free to reopen it if you still run into this problem on the latest version.