mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-23 08:02:23 +02:00
`_TimedAttemptScope.__init__` sets `_last_progress = time.monotonic()`, but the watchdog doesn't actually start polling until after `wrap_config` and task scheduling. Under heavy CI load that gap can grow large enough to consume the entire idle window before the task body's first await runs — the watchdog then fires immediately with `elapsed: 0.000s`, since elapsed is measured from the post-scheduling `start` rather than from scope init. Two test-side defenses (no production change): - Bump idle_timeout from 0.2s to 1.0s so scheduling slack stays well within it. - Call `runtime.heartbeat()` at task-body entry before the first sleep, which resets `_last_progress` to "now" the moment the task actually starts. Confirmed stable: 10/10 local repeated runs pass. Co-authored-by: Cursor <cursoragent@cursor.com>