DataStore's edit lambda can be retried when a concurrent write conflict is detected. wasCleared was captured from the outer scope and never reset between retries, so a true from a failed first attempt could leak into the final return value even if the condition no longer held on the retry. Added wasCleared = false at the top of the lambda so each attempt starts from a clean state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>