# StateTree: completion bit of a state with no completion-considered task is never reset 

**URL:** <https://forums.unrealengine.com/t/statetree-completion-bit-of-a-state-with-no-completion-considered-task-is-never-reset/2877201>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine, bug-report, CPP\
**Created:** [December 4, 2026, 4:49pm UTC](https://forums.unrealengine.com/t/statetree-completion-bit-of-a-state-with-no-completion-considered-task-is-never-reset/2877201 "2026-12-04T16:49:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WEILIANLINK](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WEILIANLINK](https://forums.unrealengine.com/u/WEILIANLINK)\
**Post date:** [December 4, 2026, 4:49pm UTC](https://forums.unrealengine.com/t/statetree-completion-bit-of-a-state-with-no-completion-considered-task-is-never-reset/2877201/1 "2026-12-04T16:49:55Z")

</div>

### Summary

`FStateTreeTasksCompletionStatus::Push()` never resets a state’s extra “state completed” bit, so the state can report `Succeeded` on entry and its children’s completion transitions are never evaluated.  
When none of a state’s tasks is considered for completion, the compiler allocates one extra “state completed” bit right after the task bits (`MakeCompletionTasksMask`). `Push()` resets only `State.TasksNum` bits, so that bit is never cleared. Bit slots are reused between non-concurrent states, and task writes ignore the mask, so a sibling’s finished task can leave it set.

### What Type of Bug are you experiencing?

AI

### Steps to Reproduce

1. In a StateTree, add sibling states A and B under the same parent; give A 3+ tasks, and B 2 tasks with “Completion” unchecked on both.
2. Give B a child state C with a completion transition, e.g. `On State Completed → D`.
3. Play until A completes and the tree transitions into B, then let C complete.

### Expected Result

B stays `Running`; C’s completion transition is evaluated and the tree transitions to D.

### Observed Result

B reports `Succeeded` as soon as it is entered (its “state completed” bit was left set by A’s task). The completion-transition search starts at B, C’s transition is never evaluated, and the tree falls back to the root state.

### Affects Versions

5.8

### Platform(s)

Windows
