02a3de7c0e
Inside loops, time.After creates a new timer goroutine each iteration that cannot be GC'd until it fires. In long-running loops (supervisor restart backoff, Telegram polling, restart-context polling, CP stop retry) this leaks goroutines proportional to iteration count. Replace with time.NewTimer + timer.Stop() on ctx cancellation so the timer is cleaned up immediately when the goroutine exits. Affected files: - supervised/supervised.go (RunWithRecover backoff) - channels/telegram.go (429 retry + poll error sleep) - handlers/restart_context.go (online + heartbeat polling) - handlers/workspace_restart.go (cpStop retry backoff) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>