anthropics / anthropics/claude-code

Session missing from sidebar after Mac sleep/wake; only recovered via quit+relaunch "import" prompt

オープン
#93,040 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:desktop bug has repro platform:macos
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

### Description
When the MacBook lid is closed (sleep) while a Claude Code desktop app chat session is active, the session disappears from the sidebar on wake — even though the working directory shown at the top of the window is unchanged and correct.

The session is not actually lost: fully quitting and relaunching the app triggers a prompt to "import" the chat, meaning the transcript is saved to disk but the app's session index/sidebar isn't updated correctly across sleep/wake.

### Steps to reproduce
1. Start or continue a chat in the Claude Code desktop app, working directory e.g. `/Users/raymond`.
2. Close the MacBook lid (sleep).
3. Reopen the lid, bring the app back.
4. Observe: the chat is missing from the sidebar, despite the top-of-window directory still showing the correct path.
5. Quit the app entirely (not just close window) and relaunch.
6. App prompts to "import" the missing chat — importing restores it.

### Expected behavior
The session should remain visible in the sidebar across sleep/wake without requiring a manual quit + relaunch + import.

### Actual behavior
Session vanishes from sidebar after sleep/wake; only recoverable via full app restart and manual import.

### Environment
- Platform: macOS (Darwin 25.6.0)
- App: Claude Code desktop app
- Working directory scoping confirmed unaffected (directory shown was correct before and after)

### Impact
No data loss, but disruptive — requires quitting and relaunching the app after every lid-close to recover an in-progress chat.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by reproducing the sleep/wake sequence on macOS with an active Claude Code desktop chat, then trace how the sidebar session index is refreshed and how the saved transcript is discovered during import. Compare the index state before sleep, after wake, and after relaunch. Done means the active session remains visible after wake without requiring a restart or manual import.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
macos
領域
desktop
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。