claude-code - 💡(How to fix) Fix Windows: Claude Desktop "Code → Recents" permanently empty — .json.tmp index files never finalized [1 comments, 2 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
anthropics/claude-code#58678Fetched 2026-05-14 03:42:15
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×3closed ×1commented ×1

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.

Root Cause

Likely root cause

Fix Action

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).

RAW_BUFFERClick to expand / collapse

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.

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