Currently if a code crashes (e.g. an exception) or is killed by the user, the run state is `lost`. Ideally it shouldn't be `lost`.