Pinned sessions silently wiped to empty array in desktop app

Resolved 💬 3 comments Opened Apr 29, 2026 by gitpoo Closed May 3, 2026

Summary

Previously pinned sessions in the Claude Code desktop app sidebar disappeared without any user action. Pin state in the Electron LevelDB (~/Library/Application Support/Claude/Local Storage/leveldb/) shows "pinnedOrder":[] — empty.

Environment

  • Claude Code desktop app version: 2.1.121
  • Entrypoint: claude-desktop
  • macOS: 26.4.1 (build 25E253), Apple Silicon

What happened

Multiple sessions were previously pinned in the sidebar. After what was likely an app update or restart, all pins were gone. Sessions and transcripts themselves are intact — only the pin state was lost.

Investigation

Pin state appears to live exclusively in the Electron app's LevelDB local storage:

  • Path: ~/Library/Application Support/Claude/Local Storage/leveldb/
  • Key fragment found: "pinnedOrder":[],"groupBy..." (empty array)
  • The two most recent .ldb files (017577.ldb dated Apr 29 15:17, 017580.ldb dated Apr 29 15:28) both show pinnedOrder as [].
  • The oldest extant .ldb (017327.ldb dated Apr 26) contains no pinnedOrder data at all — LevelDB compaction has already discarded the previous state.
  • Per-session JSON files at ~/Library/Application Support/Claude/claude-code-sessions/<account>/<workspace>/local_*.json contain isArchived, title, model, etc. — but no pin field. So pin state is not duplicated to durable per-session storage.

Why this is a bug

  1. No redundancy: Pin state lives in a single Electron LevelDB key. A migration, a corrupt write, or a compaction loss wipes it permanently with no recovery path.
  2. Silent failure: No warning, no fallback, no log message visible to the user.
  3. No backup or sync: Pins do not appear to sync across machines or persist through app updates.

Suggested fix

Persist isPinned: true (and a pinnedAt timestamp for ordering) on each session's JSON metadata file alongside isArchived. The sidebar can derive pinnedOrder from those, with the LevelDB key acting only as a UI cache rather than the source of truth.

Reproduction

Not directly reproducible without the triggering event, but trivially observable:

  1. Pin one or more sessions.
  2. strings "~/Library/Application Support/Claude/Local Storage/leveldb/"*.ldb | grep pinnedOrder — you will find the array.
  3. Compare to per-session JSON in claude-code-sessions/ — no pin field exists there.

The asymmetry between durable session metadata and ephemeral pin state is the root cause.

View original on GitHub ↗

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