What happened?
When a session is manually deleted using --delete-session or the interactive session browser, the chat JSON file is removed but the corresponding tool output files remain on disk.
This appears to happen because deleteSession() receives the chat filename while tool output directories are created using the session UUID.
As a result, the cleanup code looks for the wrong directory path and the tool output folder is never removed.
Over time this can cause unused tool output files to accumulate on disk.
What did you expect to happen?
When a session is deleted, all related data should also be removed, including:
- chat JSON file
- associated
tool-outputs/session-* directory
The cleanup should use the correct session UUID so the tool output directory is properly deleted.
Client information
Client Information
Run gemini to enter the interactive CLI, then run the /about command.
> /about
# paste output here
Login information
No response
Anything else we need to know?
While investigating this issue, I noticed that tool output directories are created using the session UUID, but deleteSession() appears to receive the chat filename instead. Because of this mismatch, the cleanup logic constructs an incorrect directory path and fails to remove the associated tool output files.
This results in unused tool output folders remaining on disk after a session is deleted manually.
The cleanup logic used in sessionCleanup.ts seems to correctly reference the session UUID, which might be helpful as a reference when fixing this issue.
What happened?
When a session is manually deleted using
--delete-sessionor the interactive session browser, the chat JSON file is removed but the corresponding tool output files remain on disk.This appears to happen because
deleteSession()receives the chat filename while tool output directories are created using the session UUID.As a result, the cleanup code looks for the wrong directory path and the tool output folder is never removed.
Over time this can cause unused tool output files to accumulate on disk.
What did you expect to happen?
When a session is deleted, all related data should also be removed, including:
tool-outputs/session-*directoryThe cleanup should use the correct session UUID so the tool output directory is properly deleted.
Client information
Client Information
Run
geminito enter the interactive CLI, then run the/aboutcommand.Login information
No response
Anything else we need to know?
While investigating this issue, I noticed that tool output directories are created using the session UUID, but
deleteSession()appears to receive the chat filename instead. Because of this mismatch, the cleanup logic constructs an incorrect directory path and fails to remove the associated tool output files.This results in unused tool output folders remaining on disk after a session is deleted manually.
The cleanup logic used in
sessionCleanup.tsseems to correctly reference the session UUID, which might be helpful as a reference when fixing this issue.