If you deploy patches with task sequences be aware of this KB

If a Configuration Manager Task Sequence that leverages the Install Software Updates step installs a software update that triggers multiple reboots, after successfully running the Install Software Updates task, the task sequence can fail with the following error message:
“Task Sequence environment not found”