[BUG] Cowork local-agent-mode sessions missing from Recents despite intact data on disk (Windows)

Status Open
Reported on v2.1.177
Maintainer reply None cached
Activity 6 comments · opened Jun 20, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Subject: Cowork/Local Agent sessions missing from Recents list despite intact local data — likely indexing issue, not data loss
Product: Claude Desktop App (Windows), Cowork / Local Agent Mode

App version path: ...\LocalCache\Roaming\Claude\claude-code\2.1.177\
Summary:

Two sessions that I interacted with heavily over the past two days disappeared from the Recents list in the Claude Desktop App. After investigation, I confirmed the underlying session data still exists intact on disk — this appears to be a display/indexing bug rather than actual data loss.
How the sessions were created:

I opened the Claude Desktop App directly (not by launching from within a specific project folder via CLI), started chatting, and mid-conversation granted the agent access to a local folder on my machine (e.g., D:\my\...\AR展厅). This is the "local agent mode" / Cowork workflow, not the CLI claude command run from a project directory.
Symptom:

Two sessions (working titles: "AR rooms..." and "机场数字孪生+仿真" / Airport Digital Twin + Simulation) no longer appear in the Recents sidebar of the Desktop App.
This coincided with my Claude Code Pro 5x subscription expiring on 2026-06-19, though I have not been able to confirm causation, only correlation.
Sessions created via claude.ai web that I had during the same period are still visible in Recents — only the Desktop App / local-agent sessions are missing.

What I verified myself (this is the key evidence):

Checked ~/.claude/projects/ (the CLI's project-based session storage) — confirmed the missing sessions are NOT here, because this directory only contains sessions launched via CLI from a specific project folder, which doesn't match how these two sessions were created.
Located the actual Desktop App data directory at:

C:\Users\[user]\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\

Inside local-agent-mode-sessions\[ownerAccountId]\, found numerous session folders named local_[uuid], each containing a corresponding .json file (sizes ranging ~45KB–110KB, consistent with real conversation data).
Confirmed one specific session folder, local_ba66fd10-1762-4485-8d4c-0c917f5a5a73, contains an outputs subfolder with the exact files produced during the "Airport Digital Twin + Simulation" conversation — including AgentController.cs, AgentFactory.cs, AirportDemo.cs, AirportSceneBuilder.cs, CameraController.cs, MaterialUtil.cs, SimModels.cs, simulation.json, README.md, and 仿真软件调研_机场方案.html — all timestamped 2026-06-17 to 2026-06-18, matching exactly when I had that conversation.
Also noted that IndexedDB\https_claude.ai_0.indexeddb.leveldb was last modified on 2026-06-20 (this morning), suggesting the local index database was rebuilt/refreshed around the time my subscription status changed — and this rebuild appears to have failed to re-include these existing local-agent sessions in the Recents list.

My conclusion (for your engineering team to verify):

The session data itself is fully intact on disk. The issue appears to be that the Recents list relies on an IndexedDB index that did not correctly enumerate/re-link existing local-agent-mode-sessions folders — possibly triggered by the subscription status change or an app update around 2026-06-19/20.
What I'm asking for:

Please confirm whether this is a known indexing bug, and whether it can be fixed by re-syncing/rebuilding the local session index without data loss.
If there's a safe way to manually restore these sessions to the Recents list (e.g., a repair tool or a documented manual fix), please advise — I'd rather not edit the JSON files myself given I don't have the internal schema.
I have already made a backup copy of the relevant local_ba66fd10-... folder before making any further changes, in case you need me to provide the raw file for diagnosis.

Happy to provide additional screenshots, the raw JSON file, or the claude_desktop_config.json / cowork-enabled-cli-ops.json files if helpful.

What Should Happen?

Cowork/Local Agent sessions missing from Recents list despite intact local data — likely indexing issue, not data loss

Error Messages/Logs

Cowork/Local Agent sessions missing from Recents list despite intact local data — likely indexing issue, not data loss

Steps to Reproduce

i don't konw how to Reproduce this bug!

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Version 1.13576.0(1290fc)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

6 Comments

github-actions[bot] · 2 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/69585
  2. https://github.com/anthropics/claude-code/issues/58670
  3. https://github.com/anthropics/claude-code/issues/60341

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

54chenxu · 2 months ago

My situation is different from theirs. I did not perform a migration, and my computer did not lose the recent history on the left side due to a power outage and restart.

54chenxu · 2 months ago

It seems the "Recents" section on the left side of the Claude Code desktop version only shows conversations I had in the web version; conversations initiated from the desktop version are not visible!

And the timing of this happens precisely when my subscription expired yesterday (though I'm unsure if there's a direct correlation between the two).

CAMonkey66 · 1 month ago

I had the sibling of this bug and fully recovered my sessions — here's how, in plain English

My case: Claude Desktop's installer broke (for reasons unrelated to Claude), I had to reinstall the app, and afterward the Code tab's Recents list was empty. All 13 of my sessions were gone from the app — but the conversations themselves were still safe on disk, and claude --resume in a terminal could still open every one. The app had simply lost its "table of contents."

Mine were Code-tab sessions (index in claude-code-sessions\); this issue is about Cowork sessions (local-agent-mode-sessions\), which is the neighboring folder with a likely-similar setup — so my exact steps may need adapting, but the approach and the big gotcha below should transfer. @54chenxu you asked for the schema and a manual fix, so here's everything I learned.

The plain-English version of what's wrong

Think of your sessions as books, and the Recents list as a library card catalog.

  • The books (your actual conversations) live in ~\.claude\projects\ as .jsonl files. Reinstalling the app does not touch them.
  • The card catalog is a folder of small JSON files — one card per session — at %APPDATA%\Claude\claude-code-sessions\<accountId>\<orgId>\. The reinstall threw the catalog away.
  • The app only shows you what's in the catalog. It never checks the shelves. Books with no card are invisible, even though they're sitting right there.

The fix: write new catalog cards for the books that lost theirs.

How to write a new card

Each card is a file named local_<random-guid>.json. Almost everything on it can be copied or derived:

  1. Start one new session in the app first. That gives you a fresh, valid card to use as a template.
  2. Each card's cliSessionId field is the important one — it must match the filename of the session's .jsonl file in ~\.claude\projects\. That's the link between card and book.
  3. cwd and originCwd are the project folder path (it's recorded inside the .jsonl — search for "cwd").
  4. Timestamps (createdAt, lastActivityAt, lastFocusedAt) are milliseconds-since-1970; the .jsonl file's created/modified times work fine.
  5. title can be anything — the folder name works.
  6. The two huge fields (enabledMcpTools, remoteMcpServersConfig) — copy them verbatim from your template card. They're just your current tool settings and are identical on every card.
  7. Everything else: copy from the template (model, effort, permissionMode) or use defaults (isArchived: false, completedTurns: 1, empty arrays/objects for the rest).

⚠️ The gotcha that cost me an hour: the invisible three bytes

My first attempt looked perfect and did nothing. The cards were valid JSON, the app even counted them in its dashboard stats — but Recents stayed empty. No error anywhere.

The cause: I'd written the files with PowerShell's Set-Content -Encoding UTF8, which on Windows PowerShell 5.1 puts a UTF-8 BOM (three invisible marker bytes) at the start of each file. The app's parser chokes on the BOM and silently skips the file. The app's own files have no BOM.

Stripped the BOM → relaunched → all 13 sessions appeared and every one opens with full history.

If you hand-edit or generate these files by any method: make sure they're saved as UTF-8 without BOM (in Notepad++ that's Encoding → UTF-8, not UTF-8-BOM).

The script that does it all (Windows PowerShell)

Run with Claude Desktop fully closed (check Task Manager). It backs up the catalog first, then writes a card (BOM-free) for every session that doesn't have one:

# Rebuild-ClaudeCodeIndex.ps1
param([int]$MinSizeKB = 2)

$projRoot  = Join-Path $env:USERPROFILE ".claude\projects"
$indexRoot = Join-Path $env:APPDATA "Claude\claude-code-sessions"

$indexDir = Get-ChildItem $indexRoot -Recurse -Filter "local_*.json" |
            Select-Object -First 1 -ExpandProperty DirectoryName
if (-not $indexDir) { throw "No existing local_*.json found - start one session in the app first." }

$templateFile = Get-ChildItem $indexDir -Filter "local_*.json" | Select-Object -First 1
$template = Get-Content $templateFile.FullName -Raw | ConvertFrom-Json

$known = @{}
foreach ($f in Get-ChildItem $indexDir -Filter "local_*.json") {
    try {
        $j = Get-Content $f.FullName -Raw | ConvertFrom-Json
        if ($j.cliSessionId) { $known[$j.cliSessionId] = $true }
    } catch { }
}

$backup = "$indexDir.backup-$(Get-Date -Format yyyyMMdd-HHmmss)"
Copy-Item $indexDir $backup -Recurse
Write-Host "Index backed up to $backup"

function Get-Cwd-FromJsonl($path) {
    foreach ($line in [System.IO.File]::ReadLines($path)) {
        if ($line -match '"cwd"\s*:\s*"((?:[^"\\]|\\.)*)"') { return $Matches[1] -replace '\\\\', '\' }
    }
    return $null
}
function Get-Title-FromJsonl($path) {
    $title = $null
    foreach ($line in [System.IO.File]::ReadLines($path)) {
        if ($line -match '"type"\s*:\s*"summary"' -and $line -match '"summary"\s*:\s*"((?:[^"\\]|\\.)*)"') { $title = $Matches[1] }
    }
    return $title
}
function To-EpochMs($dt) { [long](($dt.ToUniversalTime() - [datetime]'1970-01-01Z').TotalMilliseconds) }

$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
$made = 0; $skipped = 0
foreach ($projDir in Get-ChildItem $projRoot -Directory) {
    foreach ($jsonl in Get-ChildItem $projDir.FullName -Filter *.jsonl) {
        $cliId = [System.IO.Path]::GetFileNameWithoutExtension($jsonl.Name)
        if ($known.ContainsKey($cliId)) { $skipped++; continue }
        if ($jsonl.Length -lt ($MinSizeKB * 1KB)) { $skipped++; continue }

        $cwd = Get-Cwd-FromJsonl $jsonl.FullName
        if (-not $cwd) { $skipped++; continue }
        $title = Get-Title-FromJsonl $jsonl.FullName
        if (-not $title) { $title = Split-Path $cwd -Leaf }

        $localId = "local_$([guid]::NewGuid().ToString())"
        $entry = [ordered]@{
            sessionId                = $localId
            cliSessionId             = $cliId
            cwd                      = $cwd
            originCwd                = $cwd
            lastFocusedAt            = To-EpochMs $jsonl.LastWriteTime
            createdAt                = To-EpochMs $jsonl.CreationTime
            lastActivityAt           = To-EpochMs $jsonl.LastWriteTime
            model                    = $template.model
            effort                   = $template.effort
            isArchived               = $false
            title                    = $title
            titleSource              = "auto"
            permissionMode           = $template.permissionMode
            enabledMcpTools          = $template.enabledMcpTools
            remoteMcpServersConfig   = $template.remoteMcpServersConfig
            completedTurns           = 1
            alwaysAllowedReasons     = @()
            sessionPermissionUpdates = @()
            classifierSummaryEnabled = $true
            spawnSeed                = @{}
        }

        $json = $entry | ConvertTo-Json -Depth 100 -Compress
        [System.IO.File]::WriteAllText((Join-Path $indexDir "$localId.json"), $json, $utf8NoBom)
        Write-Host "Indexed: $($jsonl.Name) -> '$title' ($cwd)"
        $made++
    }
}
Write-Host "Created $made entries, skipped $skipped. Start Claude Desktop and check Recents."

Result for me: launched the app, all 13 old sessions listed in Recents, every one opens and resumes with full history.

For the Anthropic team

  1. Everything needed to rebuild the Recents index already exists on disk — this comment is proof it takes one script. Please have the app adopt orphaned sessions from ~/.claude/projects automatically (the ask in #59736 as well).
  2. Please tolerate a UTF-8 BOM when parsing index files — or at least log a parse failure. "File read, counted in stats, never displayed, no error" is a brutal failure mode to debug.

Environment: Claude Desktop 1.17377.2.0 (MSIX), Claude Code CLI 2.1.112, Windows 10 Pro 19045.

stubbie6 · 1 month ago

Same class of bug, with evidence that narrows it further — plus a second layer matching #78233.

Timeline: Local Cowork worked daily through 2026-07-20 (a scheduled task ran that evening). After the auto-update to the cloud-Cowork UI (~2026-07-20/21), the Cowork tab is gone and zero of my local sessions appear anywhere in the app.

Verified on disk in %APPDATA%\Claude\local-agent-mode-sessions\<account>\<org>\: all 54 session folders are intact, each with its .claude/projects/**/<cliSessionId>.jsonl transcript, audit.jsonl, and outputs. Crucially, the local_*.json index cards are ALSO intact: 52 parse cleanly as valid JSON, no UTF-8 BOM (checked raw bytes), isArchived: false on every one, titles/timestamps/cliSessionId all present and correct. Unlike @CAMonkey66's case above, the "card catalog" is NOT missing here — the app has everything it needs on disk and still displays nothing.

Of those cards, 7 have spaceId set (spaceIdSetBy: user) from organizing sessions into projects — consistent with the #78233 hiding bug. The other 45 have no spaceId and no archive flag and should appear in Recents; they don't. VirtualMachinePlatform is Enabled and CoworkVMService is running, so this is not the #50673 virtualization issue. Also tried: "Run new tasks in the cloud" toggled OFF plus full cold restart (no change), and renaming IndexedDB to force a fresh index rebuild (rebuild completes, still zero local sessions listed).

Conclusion: after the update, the UI never enumerates local-agent-mode-sessions index cards at all. Data layer fully intact; display layer ignores it. An adopt-orphans/reindex pass (as @CAMonkey66 proved takes one script) plus fixing project-assigned visibility (#78233) would restore everything.

I've since recovered all transcripts manually from the .jsonl files, so the data layer is demonstrably complete — happy to provide sanitized card samples or diagnostics if useful. Environment: Windows 11, non-MSIX install (%APPDATA%\Claude).

Marosky · 1 month ago

Same symptom on Windows Cowork, with a detailed timeline

I hit exactly this on 2026-07-29 and I have a fairly precise diagnosis, so I'm adding it
here in case it helps narrow the root cause.

What happened

After an application reset, %APPDATA%\Claude was recreated from scratch (every subfolder
timestamped at the moment of the reset, 09:57). After the restart:

  • conversations that existed on the claude.ai account came back, but with their titles

reverted and all my groups gone;

  • conversations that were local only (never synced) disappeared from the sidebar

entirely, even though their .jsonl transcripts were untouched in
~/.claude/projects/<encoded-path>/;

  • some conversations came back truncated, because their older transcript files had

already been removed by transcript cleanup — the UI showed only the surviving tail;

  • long conversations that had been continued after a context reset came back as **several

separate entries**, one per transcript file, since the chain between them was lost.

Where the index lives

The only thing that was actually lost is the session index in
%APPDATA%\Claude\IndexedDB\https_claude.ai_0.indexeddb.leveldb (fresh MANIFEST-000001
after the reset). Everything else survived.

What does NOT work as a recovery path (tested)

Hand-crafting entries in
%APPDATA%\Claude\claude-code-sessions\<accountId>\<orgId>\local_<uuid>.json, modelled
byte-for-byte on entries the app itself had written (same schema: sessionId,
cliSessionId pointing at the .jsonl, cwd, originCwd, createdAt,
lastActivityAt, title, model, permissionMode, …), does not make the sessions
appear. The files survive an app restart untouched — they are simply never picked up.
So local_*.json alone is not sufficient to register a session: the IndexedDB index is
authoritative, and there is no supported way to write to it.

Two more observations that may be relevant:

  1. While the app is closed, %APPDATA%\Claude\claude-code-sessions was not present on

disk at all (a script run with the app closed failed on a Test-Path for that folder),
yet after reopening the app the folder was back with my hand-made files still in it.
Whatever manages that directory seems to tear it down and rebuild it around the app
lifecycle.

  1. The recovery documented in #29373 (copying local_*.json from local-agent-mode-sessions

to claude-code-sessions) does not apply here: no legacy session files exist on this
machine — that folder only contains skills-plugin and rpm data.

What worked

claude --resume <session-id>, run from the session's original directory, restores each
conversation in full. That saved the work, and the CLI history is clearly independent of the
desktop index — but it means the desktop UI is the single point of failure for anything
that only ever lived there.

Request

Either of the two fixes already asked for in #59736 would have prevented all of this:
rebuild the index from the JSONL transcripts on startup, or make the per-session
local_*.json files authoritative enough to reconstruct the list. Failing that, a
supported "repair/reindex sessions" command would be enough — right now there is no
sanctioned recovery path, and the only advice available online is to edit internal files,
which (as shown above) doesn't work anyway.

Environment: Windows 11 Pro 26200, Claude Desktop with Cowork, transcripts under
C:\Users\<user>\.claude\projects\, app data under C:\Users\<user>\AppData\Roaming\Claude\.