# Why doesn't Restarted() work?

**URL:** <https://forum.rasa.com/t/why-doesnt-restarted-work/12699>\
**Category:** Rasa Open Source\
**Created:** [July 9, 2019, 4:10pm UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699 "2019-07-09T16:10:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![twittmin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/twittmin/32/2091_2.png) [@twittmin](https://forum.rasa.com/u/twittmin)\
**Post date:** [July 9, 2019, 4:10pm UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/1 "2019-07-09T16:10:35Z")

</div>

In my ‘action\_ask\_weather’ action class, the ‘run’ method returns:

`return [Restarted()]`

By doing this, I want to be able to have the effect of having only single-turn dialog, that is. the bot only supports a single Question-Answer pair between user and the robot. Once the answer is generated through the action class, I thought I should return a list of Restarted() to destroy any previous dialog history. However, when I test, this return value doesn’t have any effect, and when I debug into the code in processor.py, the history is still remembered well, including the events and slots.

Should I do something else, in addition to the returned value to achieve the effect?

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [July 10, 2019, 8:46am UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/2 "2019-07-10T08:46:00Z")

</div>

restarted doesn’t erase all previous events. It is taken into account when creating `applied_events()` for featurization, so that policies ignore all previous history. So effectively you remove all history, so it’s still work

---

<div class="post-metadata">

**Author:** ![twittmin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/twittmin/32/2091_2.png) [@twittmin](https://forum.rasa.com/u/twittmin)\
**Post date:** [July 10, 2019, 3:03pm UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/3 "2019-07-10T15:03:10Z")

</div>

@Ghostvv, hi Ghostvv, didn’t quite get what you mean. Can you elaborate on it a little more? Thanks

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [July 10, 2019, 3:23pm UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/4 "2019-07-10T15:23:09Z")

</div>

`tracker.events` are not used entirely for featurization. For featurization we use [tracker.applied\_events()](https://github.com/RasaHQ/rasa/blob/e002d095134d52afbd4474a77738739957263db6/rasa/core/trackers.py#L335) which doesn’t include any history before `Restarted()`

---

<div class="post-metadata">

**Author:** ![twittmin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/twittmin/32/2091_2.png) [@twittmin](https://forum.rasa.com/u/twittmin)\
**Post date:** [July 10, 2019, 6:40pm UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/5 "2019-07-10T18:40:20Z")

</div>

@Ghostvv, So, do you have a recommendation on how to achieve a single-turn dialog robot? By that, simply remove all previous events at some point? Is there a way to do that?

---

<div class="post-metadata">

**Author:** ![twittmin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/twittmin/32/2091_2.png) [@twittmin](https://forum.rasa.com/u/twittmin)\
**Post date:** [July 10, 2019, 9:06pm UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/6 "2019-07-10T21:06:30Z")

</div>

“So effectively you remove all history, so it’s still work”

@Ghostvv Do you mean Restarted() has the effect of removing history? But my test didn’t feel that. Is that true?

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [July 11, 2019, 10:27am UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/7 "2019-07-11T10:27:07Z")

</div>

yes `Restarted()` do the job, in your test you checked different thing

---

<div class="post-metadata">

**Author:** ![twittmin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/twittmin/32/2091_2.png) [@twittmin](https://forum.rasa.com/u/twittmin)\
**Post date:** [July 12, 2019, 3:43pm UTC](https://forum.rasa.com/t/why-doesnt-restarted-work/12699/8 "2019-07-12T15:43:08Z")

</div>

@Ghostvv This actually works and thanks!
