diff --git a/backend/app/services/strategy_service.py b/backend/app/services/strategy_service.py index 67abf6d..6088918 100644 --- a/backend/app/services/strategy_service.py +++ b/backend/app/services/strategy_service.py @@ -571,6 +571,12 @@ def start_strategy(req, user_id: str): } if engine_external: return {"status": "already_running", "run_id": running_run_id} + # If caller explicitly passes a strategy, update the saved config so + # both the engine and future resumes use the new strategy. + req_strategy = getattr(req, "strategy_name", None) if req is not None else None + if req_strategy and req_strategy != running_cfg.get("strategy"): + running_cfg["strategy"] = req_strategy + save_strategy_config(running_cfg, user_id, running_run_id) engine_config = _build_engine_config(user_id, running_run_id, req) if engine_config: try: