Skip to main content

Module startup_guard

Module startup_guard 

Source

Structs§

StartupLockGuard

Constants§

CRASH_LOOP_MAX_BACKOFF_SECS
CRASH_LOOP_THRESHOLD
CRASH_LOOP_WINDOW_SECS
MCP_PROCESS_NAME

Functions§

crash_loop_backoff
Detects rapid restart loops (e.g., IDE keeps respawning a crashing MCP server). Records each startup timestamp; if too many happen within the window, sleeps with exponential backoff to break the loop and avoid host degradation.
crash_loop_log_path
reset_crash_loop
Clears the crash-loop history file, resetting any active backoff.
try_acquire_lock
Best-effort cross-process lock (create_new + stale eviction).