Windows: Claude Desktop "Code → Recents" permanently empty — .json.tmp index files never finalized

Resolved 💬 2 comments Opened May 13, 2026 by DanielHayballCode Closed May 13, 2026

Summary

On Windows, Claude Desktop writes per-session index files to
%APPDATA%\Claude\claude-code-sessions\<workspace>\<user>\local_<id>.json.tmp
but the final rename to local_<id>.json never happens. The Code → Recents
panel only enumerates *.json, so it stays permanently empty even though
the CLI's session transcripts under ~/.claude/projects/<project>/*.jsonl
are all present.

Repro

  1. Fresh install of Claude Desktop on Windows.
  2. Run any Claude Code session via the Desktop's Code tab (or CLI).
  3. Open Code → Recents.

Expected: The session appears in Recents.
Actual: Recents is empty.

Diagnosis

In my install, the directory contained 25 stuck .json.tmp files and 0 .json files, going back to install date. Renaming them all to .json and restarting Desktop made every session immediately appear in Recents. New sessions keep producing fresh .json.tmp files that also never get renamed, so the bug reproduces continuously.

.tmp file contents look correct (valid JSON with sessionId, cliSessionId, cwd, title, model, etc.) — only the rename step is broken.

Environment

  • OS: Windows 11
  • Claude Desktop: 1.7196.0
  • Bundled Claude Code: 2.1.138

Workaround

\\\powershell
Get-ChildItem "\$env:APPDATA\Claude\claude-code-sessions" -Recurse -Filter "local_*.json.tmp" |
ForEach-Object { Move-Item -LiteralPath \$_.FullName -Destination (\$_.FullName -replace '\.json\.tmp\$','.json') -Force }
\
\\

Followed by a full Desktop restart (close + reopen of the process, not just window).

Likely root cause

Atomic-write pattern's rename step silently failing on Windows — possibly the Desktop process exiting before the rename completes, or \fs.rename\/\fs.writeFileSync\ semantics on Windows when the destination doesn't exist. Worth checking that the rename has a \MOVEFILE_REPLACE_EXISTING\-equivalent code path and that errors are logged rather than swallowed.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗