[BUG] SSH Remote: `projects` field in remote ~/.claude.json becomes null after desktop restart — jsonl files intact, UI shows 'No messages yet' for every session
Summary
After restarting the Claude Code desktop client while connected to a remote host via SSH Remote, the sidebar shows "No messages yet" for every conversation. Investigation on the remote shows the top-level projects field of ~/.claude.json has been nulled out, while the .jsonl transcript files in ~/.claude/projects/<project>/ are intact and continue to be appended to in real time.
This appears related to #54187, #53717, and #34324 but with a stricter form of the corruption — the projects map is entirely missing instead of just having empty sessions[] arrays per project.
Environment
- Client: Claude Code Desktop on Windows 10/11
- Connection: SSH Remote via OpenSSH 9.6 (Windows native OpenSSH)
- Server: Ubuntu 24.04.4 LTS (Noble Numbat), claude-code installed under
/root - Working dir on remote:
/root
State of remote ~/.claude.json after bug triggers
>>> import json
>>> d = json.load(open('/root/.claude.json'))
>>> list(d.keys())
['cachedGrowthBookFeatures', 'unpinOpus47LaunchEffort', 'firstStartTime',
'opusProMigrationComplete', 'sonnet1m45MigrationComplete', 'seenNotifications',
'migrationVersion', 'userID', 'cachedExperimentFeatures',
'cachedExtraUsageDisabledReason', 'skillUsage']
>>> d.get('projects')
None
>>> type(d.get('projects'))
<class 'NoneType'>
No projects map at all — not {}, not per-project entries with empty sessions[].
Data side is intact
$ ls ~/.claude/projects/-root/*.jsonl | wc -l
14
$ du -sh ~/.claude/projects/-root/
17M
$ for f in ~/.claude/projects/-root/*.jsonl; do
python3 -c "import json
bad = 0
for l in open('$f'):
try: json.loads(l)
except: bad += 1
print('$f', bad)"
done
# every file: 0 malformed
The currently-active session's .jsonl continues being appended to within seconds of sending a message from the (broken) UI, so the CLI/backend write path is fine. Only the index is broken.
UI symptom
- Sidebar lists conversations as normal.
- Clicking any conversation shows "No messages yet" — including the one I am actively sending messages to.
- After restarting Claude Code on the desktop, no messages render at all.
Repro context
- Long-running conversation (~1000 lines, ~2 MB in the .jsonl).
- Closed the desktop window while SSH session was active.
- Reopened — broken state since.
Difference from #54187
#54187 (macOS local) reports sessions[] arrays per project go empty. In this SSH-remote case, the projects map is entirely missing (null). Possibly the same root cause hitting a different code path that writes through ~/.claude.json, or a separate bug masked as the same UI symptom.
What would help
Happy to share:
- Sanitized
~/.claude.json(after strippinguserIDand tokens). - Diagnostics on the active jsonl that keeps being appended to despite the broken index.
- Try a specific repro on request.
Workaround attempted
Reconstructing the projects map manually from filesystem scan was attempted but I want maintainer guidance on the exact expected schema (sessions array of {id, ...}? other required keys per project?) before writing to my own ~/.claude.json. Will report back if I find a safe regeneration script.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗