fix(ssh-agent): simplify error handling in ServeAgent function (#1714)