anthropics / anthropics/claude-code

Jammed background tasks + Remote Control reconnect loops silently consume Max usage window after forced token rotation

オープン
#87,805 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:agent-view area:auth area:cost bug platform:macos stale
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

## Summary
After a Claude Desktop auto-update forced an OAuth token rotation (all sessions invalidated at once), a combination of (a) Desktop background tasks (`spawn_task` chips) stuck in a jammed state, (b) sessions hosting Remote Control that entered reconnect/fail loops against invalid credentials, and (c) restoring/re-hosting threads into a second account burned through an entire Max 5-hour usage window with zero user-visible progress. There is no circuit breaker, no progress-vs-spend signal, and no per-session usage attribution to identify the burner while it is happening.

## Environment
- macOS Darwin 25.5.0 (arm64)
- Claude Desktop 1.32352.1 (auto-updated overnight ~00:14 local; update invalidated all OAuth tokens on the machine)
- Claude Code engine 2.1.229 (Desktop-embedded) / 2.1.235 (CLI)
- Two Max accounts on one machine (separate Desktop profiles via --user-data-dir)

## Timeline / mechanism
1. Overnight auto-update rotates tokens; every session on the machine 401s.
2. Sessions that were hosting Remote Control enter reconnect loops; claude.ai threads show recurring 'Remote Control disconnected' banners. Threads whose host process died continue to show 'N running tasks'.
3. Two Desktop spawn_task chips jammed (running, no progress). User forwarded the work to the second Max account and restored/resumed threads there.
4. The second account's 5-hour usage window was fully consumed by this restoration/retry activity without a single task completing.

## Problems
1. **No circuit breaker**: tasks/sessions retrying against a dead or rotated credential (or otherwise not progressing) keep consuming the subscription usage window indefinitely.
2. **No attribution**: nothing in Desktop or claude.ai shows which session/task is consuming the window, so a runaway burner can only be found by killing things one at a time.
3. **Stale 'running tasks' state**: threads whose local host process is gone still display running tasks, inviting the user to wait on work that can never complete.
4. **Update timing**: the auto-updater swaps the binary and rotates tokens while sessions (including Remote Control hosts and background tasks) are live, which is what seeds the loop.

## Asks
- Exponential backoff + hard stop for background tasks/hosts that repeatedly fail auth or make no forward progress; surface a 'stalled' state instead of spinning.
- Per-session/per-task usage attribution visible to the user (even a coarse breakdown would let a runaway be identified before the window is gone).
- Reconcile 'running tasks' indicators with actual host liveness.
- Defer binary swap / token rotation while sessions are actively hosting Remote Control or running background tasks, or re-auth them gracefully afterwards.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

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

調査の方向性

Begin with the Desktop `spawn_task` background-task path and the Remote Control host reconnect path described in the timeline; reproduce the forced token-rotation sequence and observe retries, task state, and usage. Done means stalled work stops consuming usage, task status reflects host liveness, and users can identify per-session or per-task usage.

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

評価

技術スタック
macos
領域
authentication, desktop, observability
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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