forked from openclaw/openclaw
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(runtime): prevent restart loop after model config switch [Sprint 2.5 D10] #39
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Sprint 2.5 — D10: Fix P0 Restart Loop หลัง Model Switch
Branch: feat/sprint-2.5-d10-restart-loop
Base: main
Depends on: D4 ✅ (schema validation merged — prevents future bad config)
Task
Fix the P0 restart loop that occurs after switching the model in config.
Investigation needed:
- Find runtime config reload logic
- Find container restart / supervisor logic
- Identify why model switch causes restart loop
Fix requirements:
- Model switch should trigger at most one clean restart
- If new model is invalid or unavailable → fall back to previous working model, do NOT enter crash loop
- Add safeguard: if restart count exceeds 3 within 5 minutes → stop restarting and log alert
- Add clear error logging when model switch fails
Acceptance Criteria
- No restart loop after model config switch
- Model switch triggers at most one clean restart
- Invalid model → graceful fallback to previous model, not crash loop
- Restart loop detection: if >3 restarts in 5 minutes, stop and alert
- Clear error message logged when model switch fails
Commit Message
fix(runtime): prevent restart loop after model switch (#196)
Reference
- Issue: Piboonsak/Openclaw#196
Labels
- sprint-2.5
- copilot
Reactions are currently unavailable