Token Optimization Applied — 2026-05-09
Trigger: Joseph reported Claude Code usage stopping with $50+ still available on 2026-05-09. Audit showed 6 high-frequency Cowork tasks driving ~88% of session burn (~260 of ~294 runs/day).
Applied (durable): Via mcp__scheduled-tasks__update_scheduled_task API. This path goes through the task manager, so the changes survive Claude Code restarts and hot-reloads. (Earlier attempts to edit scheduled-tasks.json directly were silently reverted by Claude Code's in-memory state.)
New cadence (canonical — do not auto-revert)
| Task | Old cron | New cron | Was/now per day |
|---|---|---|---|
sot-reconciler | /15 | /45 | 96 → 32 |
engagement-reconciler | /30 | 0 * | 48 → 24 |
qb-quarterback | /30 6-22 | 0 6-22 * | 34 → 17 |
pwa-refresh | /30 7-22 | 0 7-22 * | 32 → 16 |
live-ea | /20 9-18 1-5 | 0 9-18 * 1-5 | 30 → 10 |
dq-realtime-monitor | /30 9-18 | 0 9-18 * | 20 → 10 |
| Total | 260 → 109 |
Why this is safe
These changes reduce CHECKING frequency, not the work each run does:
- SoT reconciliation drift accumulates by ≤30 extra min worst-case (was 15-min cap, now 45)
- HS engagement reconciliation: same data fidelity, hourly vs every 30
- PWA staleness: still backed by launchd
pwa-periodic-refresh(every 30 min, pure bash, zero Claude tokens) — only the Cowork-driven full rebuild slowed down - Live-EA: new mail surfaces within 60 min instead of 20; on-demand
/api/trigger-extract(launchd) keeps re-auth + manual triggers under 30s
For anything time-critical (re-auth, manual triggers), the launchd bash poller pipeline (extract_trigger_runner.py, session_keep_alive.py, pwa-periodic-refresh) handles it in seconds with zero Claude tokens.
Do NOT auto-revert
If a future audit or skill flags these as "reduced from prior cadence — restore?", do not restore. This was an explicit token-budget decision by Joseph. The descriptions on each task were also rewritten to match the new cadence so reading them confirms the intent.
To re-tighten if business need changes, edit mcp__scheduled-tasks__update_scheduled_task — never patch the JSON file directly.
Companion docs
- Audit + reasoning:
~/Desktop/SkyRun/SCHEDULE_OPTIMIZATION.md - Pure-bash alternatives still running (zero tokens):
reference_session_keep_alive.md - Apply script (now superseded):
~/Library/Application Support/SkyRun/optimize_cron.py— kept for reference; no longer needed because the MCP API path is durable.