gemini-cli - 💡(How to fix) Fix In the interactive /resume menu, deleting a session using the x shortcut fails silently. The session disappears from the UI but the underlying .jsonl file in ~/.gemini/tmp/<hash>/chats/ is never deleted [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26113Fetched 2026-04-29 06:35:48
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Error Message

passed from the UI session browser does not seem to contain the correct file property or path. The backend deleteSession method catches the missing/invalid file path and resolves without throwing an error,

Root Cause

Root Cause: The handleDeleteSession callback in chunk-APBWRLCM.js (and related chunks) expects session.file to be present (await chatRecordingService.deleteSession(session.file);), but the session object passed from the UI session browser does not seem to contain the correct file property or path. The backend deleteSession method catches the missing/invalid file path and resolves without throwing an error, causing the UI to optimistically remove the item from the state while the file remains on disk.

RAW_BUFFERClick to expand / collapse

What happened?

Root Cause: The handleDeleteSession callback in chunk-APBWRLCM.js (and related chunks) expects session.file to be present (await chatRecordingService.deleteSession(session.file);), but the session object passed from the UI session browser does not seem to contain the correct file property or path. The backend deleteSession method catches the missing/invalid file path and resolves without throwing an error, causing the UI to optimistically remove the item from the state while the file remains on disk.

What did you expect to happen?

Pressing x should permanently delete both the UI reference and the physical session file from the local storage.

Client information

  • CLI Version: 0.39.1
  • Git Commit: 4d73f3413
  • Session ID: 216fd0ff-20e 1-4dfa-ab28-96a5b62935a6
  • Operating System: linux v22.22.2
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3-pro-preview
  • Auth Type: o auth-personal
  • Memory Usage: 348.8 MB
  • Terminal Name: tmux 3.4
  • Terminal Background: #0c0c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The handleDeleteSession callback expects a session.file property, which is missing from the session object passed from the UI, causing the file to remain on disk after attempted deletion.

Guidance

  • Verify the session object passed from the UI contains the correct file property or path by adding logging or debugging statements in the UI code.
  • Check the chatRecordingService.deleteSession method to ensure it correctly handles cases where the session.file property is missing or invalid.
  • Update the handleDeleteSession callback to handle cases where session.file is missing, potentially by throwing an error or returning an error message to the UI.
  • Review the UI code to ensure it correctly constructs and passes the session object with the required file property to the handleDeleteSession callback.

Example

// Example of how to add error handling in handleDeleteSession callback
if (!session.file) {
  throw new Error('Session file property is missing');
}
await chatRecordingService.deleteSession(session.file);

Notes

The provided information suggests a discrepancy between the expected and actual properties of the session object passed from the UI. Without more context or code, it's difficult to provide a complete solution.

Recommendation

Apply a workaround by updating the handleDeleteSession callback to handle missing session.file properties, as this will allow for more robust error handling and prevent silent failures.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING