-
Stefy Lanza (nextime / spora ) authored
On the Tasks page a running generation's token count (step) appeared frozen and only refreshed every several seconds, while the speed kept moving. Cause: the primary engine's task list is frequently served from the front's last-good cache (when the engine is briefly busy), so the task's step froze — but rate, a cumulative average over growing elapsed time, kept drifting, so it looked like "only the speed updates". The front is itself relaying the SSE stream and counting tokens per request (engine.active, refreshed ~2×/s by the streaming proxy), but that live count was deduped away in favor of the stale real task. Fix: in _merge_engine_tasks, overlay the live in-flight step/rate (from engine.active) onto the matching running task before the synthetic-task dedup, so the count stays live regardless of how stale the engine's own task snapshot is. Match on (engine, model); fall back to the engine's sole live generation when the client's model string (alias/path) differs from the task's resolved name. Co-Authored-By:
Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DDv7BchtZQWsnPG6Jm49m
ffb47992