anthropics / anthropics/claude-code

Desktop app (CCD): inter-session messages delivered but never processed — wake deferred ~8h, dies offline, never retried

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

説明

## Summary

Since ~Aug 10 (desktop app bundling claude-code 2.1.234), inter-session messages sent via the `ccd_session_mgmt` `send_message` MCP tool are delivered to the receiving session's UI (the "Message from " card renders) but the receiving session never processes them — no agent turn ever runs on the message. The sender gets a successful "Message sent"/"Message queued" tool result. This silently breaks multi-session coordination workflows (host session fanning out findings to worker sessions).

## Environment

- macOS (Darwin 25.5.0), Claude desktop app, bundled claude-code 2.1.234
- Heavily multi-session use: ~10 concurrent local CCD sessions on git worktrees
- Laptop sleeps frequently between work windows

## What the logs show (root-cause hypothesis)

Delivery works, and the app does schedule a wake of the receiving session with the message pending as a user turn — but the wake is armed ~8 hours out, which lands overnight while the machine is asleep/offline. The single processing attempt then dies with no first API response and is never retried:

1. Sends at 2026-08-19 21:36-21:37Z from the sender session all return success.
2. `main.log` shows for each recipient session, identically at 2026-08-20 04:17:01 local:
```
[CCD] Session local_734718aa-... timed out after 970s of inactivity (hadFirstResponse=false, last_message_type=user, last_tool_name=none, seconds_since_stderr=never)
[CCD] Session local_c521952c-... timed out after 970s of inactivity (hadFirstResponse=false, last_message_type=user, ...)
[CCD] Session local_7e0c2575-... timed out after 970s of inactivity (hadFirstResponse=false, last_message_type=user, ...)
```
3. Surrounding log is full of sleep/offline signals at those windows: `[event-loop-stall] main process blocked for 779912ms [likely sleep]`, `net.isOnline() is false`, `ERR_INTERNET_DISCONNECTED`, and `[CCD CycleHealth] api_error ... Unable to connect to API: SSL certificate hostname mismatch` / `Connection refused` immediately post-wake.
4. The message text never appears in the receiving session's transcript `.jsonl` — only in the sender's transcript. `loop wakeup armed for <+8h>` lines correspond to the deferred processing.

So: **one delivery attempt, deferred into a window where the API is unreachable, killed on timeout, never retried** — including after network restore or when the user later opens the session.

## Expected

- Process the queued message promptly on delivery when the app is online; otherwise retry on network-restore/app-wake.
- A wake attempt that dies with `hadFirstResponse=false` should requeue the message, not drop it.
- At minimum, surface the failure in the UI instead of showing the message card as if handled.

## Impact

Fan-out coordination between sessions is unreliable enough to be unusable — a batch of 4 addendum messages sent between sessions on Aug 19 was 100% dropped. Spawning new sessions (chips) works; messaging existing ones does not.

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

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

調査の方向性

Start by tracing the ccd_session_mgmt send_message flow and the loop wakeup handling, using main.log to correlate deferred wakes, timeouts, and network failures. Check the receiving session transcript .jsonl to verify whether the message is processed; done means queued messages retry after offline wakeups or network restoration instead of being silently dropped.

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

評価

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

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

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