Set the working_directory to the cwd in foreground
Allow STOPPED when waiting to stop