server: add encoder to task.run