anthropics / anthropics/claude-code

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

Abierto
#87,805 2 comentarios 0 reacciones 0 asignados Ver en GitHub
area:agent-view area:auth area:cost bug platform:macos stale
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

## 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)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
macos
Área
authentication, desktop, observability
Tipo de issue
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.