# Tracker gets restarted (action\_session\_start) after the first fallback

**URL:** <https://forum.rasa.com/t/tracker-gets-restarted-action-session-start-after-the-first-fallback/55273>\
**Category:** Rasa Open Source\
**Created:** [September 12, 2022, 9:26am UTC](https://forum.rasa.com/t/tracker-gets-restarted-action-session-start-after-the-first-fallback/55273 "2022-09-12T09:26:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NguyenN22564278](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nguyenn22564278/32/21513_2.png) [@NguyenN22564278](https://forum.rasa.com/u/NguyenN22564278)\
**Post date:** [September 12, 2022, 9:26am UTC](https://forum.rasa.com/t/tracker-gets-restarted-action-session-start-after-the-first-fallback/55273/1 "2022-09-12T09:26:59Z")

</div>

Hi, I’ve been using Rasa 2.8.x and 3.x and ran into this weird behavior between Rasa shell and using [REST APIs](https://rasa.com/docs/rasa/pages/http-api/#operation/predictConversationAction).

I have 2 intents ( **greeting** , **profanity** ) and only one rule for **profanity**. [domain-x.yml](https://forum.rasa.com/uploads/short-url/mAaQeQijkD8cc7GUsI1Cg7VWxXK.yml) (283 Bytes)

Here are the steps when testing with REST APIs:

1. [Add message to tracker](https://rasa.com/docs/rasa/pages/http-api/#operation/addConversationMessage) : “Hello” → detected intent was greeting
2. [Predict next action](https://rasa.com/docs/rasa/pages/http-api/#operation/predictConversationAction): the result is action\_default\_fallback as the intent doesn’t have rules or stories.
3. [Execute the action](https://rasa.com/docs/rasa/pages/http-api/#operation/executeConversationAction): action\_default\_fallback
4. Predict next action again: this time it returned action\_default\_fallback again while the action should be **action\_listen** when testing with Rasa shell or the message that makes the bot fallback was not the first message of a tracker.
5. Even step 4 was not right, I tried to execute action\_default\_fallback
6. Predict next action again: and it returned action\_default\_fallback
7. same as 5
8. same as 6
9. 
  1. 
    1. …The bot got into an infinite loop.

* * *

I debugged and saw that the tracker was detected as a new session since applied\_events() is empty ([rasa/rasa/core/processor.py at 2.8.x · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/blob/2.8.x/rasa/core/processor.py#L191)), and action\_session\_start was executed. This also happened with Rasa interactive.

Below are the events of the tracker after step 4:

## [tracker.json](https://forum.rasa.com/uploads/short-url/bdqhc0GnYaBWdaTMr67JldnIbjB.json) (1.9 KB)

I wonder if this is a bug in Rasa’s implementation. Or the way I use REST APIs is not right or I have to handle that specific case when the bot fallbacks at the first message. If so, could you suggest solutions? Thanks.

---

<div class="post-metadata">

**Author:** ![NguyenN22564278](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nguyenn22564278/32/21513_2.png) [@NguyenN22564278](https://forum.rasa.com/u/NguyenN22564278)\
**Post date:** [September 12, 2022, 11:32am UTC](https://forum.rasa.com/t/tracker-gets-restarted-action-session-start-after-the-first-fallback/55273/2 "2022-09-12T11:32:37Z")

</div>

One solution I have now is to stop predicting after action\_default\_fallback gets executed. In the example above, step 4 will be **Execute action\_listen** , and step 5 is to wait for user input.
