[BUG] Desktop update to environments migrated only 8 of 20 project folders; the rest dumped into Default

Status Open
Reported on v2.1.295
Maintainer reply None cached
Activity 1 comment · opened Oct 14, 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?

After updating Claude Desktop (macOS) to 2.37337.1 today, the Claude Code sidebar was migrated to the new environments model. The migration created environments for only 8 of my 20 local project folders and dumped every session from the other 12 folders into a single flat Default group. Before the update, all 20 folders appeared as their own groups in the sidebar.

No data was lost (every session record and transcript is still on disk and opens fine from Default), but per-project organization is gone for 12 active projects, and the only in-app fix is manually creating 12 environments one at a time.

Evidence

  • ~/Library/Application Support/Claude/ccd-session-presets.json was written once at update time with "seededFromDraft": true and exactly 8 presets, all with the same createdAt.
  • The 8 kept are exactly the 8 folders with the most sessions (counted from claude-code-sessions/<account>/<org>/local_*.json by originCwd). The cutoff fell inside a tie (two folders with 17 sessions each; one kept, one dropped). Folders used this week were dropped because they have fewer total sessions.
  • The 12 dropped folders still have 133 valid, unarchived session records whose cwd/originCwd point at them; transcripts are intact in ~/.claude/projects/.
  • Manually creating an environment for one dropped folder immediately moved that folder's sessions out of Default into their own group, so grouping-by-cwd works; the migration just never created the environments.
  • The source of truth appears to be the renderer localStorage key persisted.ccd-session-presets.<accountId>; the JSON file is only a mirror. Adding the missing presets to the JSON while the app was fully quit gets overwritten from localStorage ~3 seconds after the next launch, so there is no file-level workaround.

What Should Happen?

The migration should create an environment for every local folder that has existing sessions (at minimum, every folder that had its own sidebar group before the update), not a top-8 by session count. Failing that, Default should offer a one-click "create environments for these folders" action.

Error Messages/Logs

Steps to Reproduce

  1. Have Claude Code desktop sessions in more than 8 distinct local folders.
  2. Update Claude Desktop to 2.37337.1 (macOS) and relaunch.
  3. Open the Code sidebar: only 8 folder groups remain; sessions from every other folder appear under "Default".

Environment: Claude Desktop 2.37337.1, bundled Claude Code 2.1.295, macOS 26.7.1, Apple Silicon.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.295 (Claude Code), bundled in Claude Desktop 2.37337.1

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗