Window keeper: keep the windows, recover dead tokens, say why

Status:awaiting approval
Date:2026-10-26
Branch:jack_20261026_window_keeper_recovery (+ 2 sibling branches)
Type:plan
Tier:LARGE credential handling

Goal

Every Claude account keeps an open 5h window during active hours, even with the lid closed. When the keeper cannot open a window, the card says why and offers the fix. A dead token chain never leaves a dead token in service. The Codex account reads usage again.

Evidence (running 0.107.3 == origin/master 9def67c)

Workstreams (parallel worktrees, unit tests only per builder)

A. Keeper scheduling and recovery + UI reason (PR 1)

B. Token chain correctness (PR 2)

C. User CLIs under the service PATH (PR 3)

Gates and proof

  1. Builders run only the unit tests for their files.
  2. Combine the three branches on one integration branch; run the full local CI pipeline once; /dcr (LARGE) and /cso beside it.
  3. Live proof: install the build, close the lid 30+ min, confirm sweep heartbeats every ~5 min of wall time and open windows on wake; Codex card shows current usage; a forced-dead CC token row self-recovers or shows "re-auth needed".

Filed, not fixed here