# Running On Exit state tree task will break the tree 5.8.4

**URL:** <https://forums.unrealengine.com/t/running-on-exit-state-tree-task-will-break-the-tree-5-8-4/2855015>\
**Category:** AI\
**Tags:** unreal-engine, question\
**Created:** [November 13, 2026, 10:44am UTC](https://forums.unrealengine.com/t/running-on-exit-state-tree-task-will-break-the-tree-5-8-4/2855015 "2026-11-13T10:44:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GPBF](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GPBF](https://forums.unrealengine.com/u/GPBF)\
**Post date:** [November 13, 2026, 10:44am UTC](https://forums.unrealengine.com/t/running-on-exit-state-tree-task-will-break-the-tree-5-8-4/2855015/1 "2026-11-13T10:44:49Z")

</div>

Has anyone been having this issue - I have states that are not considered for completion that run code on state exit and it works fine the first time but after than, when entering back into that state I get a fail back to root.

If I remove it, no problems at all.

never had this issue before.
