When throwing an exception in a task, the exception is serialized and sent back to the parent process. When exception_ignore_args is disabled, this exception also includes arguments that cannot and should not be serialized.
An error like this is thrown:
PHP Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed in vendor/aternos/taskmaster/src/Communication/Socket/Socket.php:46
(This error can also occur for other reasons)
You can check your current php.ini setting using
php -i | grep "exception_ignore_args"
For now, the easiest fix is to enable exception_ignore_args in your php.ini.
A better solution would be removing all args from exceptions when serializing in Taskmaster.