mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-15 08:56:07 +00:00
28bffdef21
_ColdStartRetry was caught in _lifecycle_loop_with_retry which set _preserve_managed_process = True — but by then the finally block inside _lifecycle_loop had already run and called _cleanup_box_stdio_session(), stopping the live managed process (return_code=143 SIGTERM). The cold-start retry then restarted a fresh process, eliminating the warm-up advantage. Fix: add an explicit except _ColdStartRetry in _lifecycle_loop that sets _preserve_managed_process = True before re-raising. The finally block then sees the flag and skips stop_managed_process, leaving the live process untouched for the next handshake attempt. Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>