bug fix
support restoring detail tasks
simplify agent resolver