Updated cli spec to run in a thread