SDK in-place update (2.1.76 → 2.1.78) wipes ~/.claude/ user config and memory
Summary
When the embedded Claude Code SDK auto-updates in-place (observed 2.1.76 → 2.1.78 on macOS, Claude Desktop 1.1.7203 → 1.1.7714), the HostCLIRunner re-initializes ~/.claude/ as a fresh install, destroying existing user data.
Files destroyed
CLAUDE.md— custom instructions built up over weeks.claude.json— accumulated project trust settings, allowed tools, permissions historyprojects/— per-project configuration and memory filesscheduled-tasks/— scheduled task definitionsshell-snapshots/— shell environment snapshotsplans/— saved plan files
Files that survived (stored elsewhere)
~/Library/Application Support/Claude/local-agent-mode-sessions/— all 30+ session conversation histories~/.claude/debug/— debug logs (apparently not touched by re-init)~/Library/Logs/Claude/— application logs
Evidence from main.log
2026-03-22 15:20:02 [info] Config file written
2026-03-22 15:20:02 [info] [CCD] Status: ready (version: 2.1.78)
2026-03-22 15:20:12 [info] [HostCLIRunner] Command completed with exit code 0
2026-03-22 15:20:13 [info] [CCDMarketplacePluginManagerCLI] Adding marketplace: anthropics/claude-plugins-official
2026-03-22 15:20:13 [info] [CCDMarketplacePluginManagerCLI] Marketplace added: claude-plugins-official
2026-03-22 15:20:20 [error] [ScheduledTasks] Failed to read task file for docket-check-aguirre: ENOENT: no such file or directory, open '.../docket-check-aguirre/SKILL.md'
The firstStartTime in .claude.json was reset to the update timestamp (2026-03-22T20:20:12.256Z). The backup file from that moment contains only a bare-minimum config ({ "firstStartTime": "..." }), confirming the old config was overwritten rather than migrated.
Timeline
- 10:19 — App starts normally after ShipIt update. SDK 2.1.76. Reports 30 persisted sessions.
- 15:00–15:17 — Active session running normally.
- 15:20:02 — SDK silently upgrades to 2.1.78 mid-session. Config rewritten. Marketplace re-added as if fresh install.
- 15:20:20 — Scheduled task fails with ENOENT (task file no longer exists).
- Next morning — User discovers CLAUDE.md and all config missing.
Recovery
Memory files and config were recovered via SCP from another machine (Socrates) running the same Claude account. Project trust/permissions history was not recoverable.
Expected behavior
SDK updates should migrate existing ~/.claude/ config, not overwrite it. At minimum, the directory should be backed up before any re-initialization.
Environment
- macOS Tahoe 26.3
- Apple Silicon (M4 Mac Mini)
- Claude Desktop: 1.1.7203 at boot, updated to 1.1.7714
- Claude Code SDK: 2.1.76 → 2.1.78
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗