Search Issue Tracker

Active

Votes

0

Found in

Not Applicable

Issue ID

UUM-142395

Regression

No

Multiple concurrent CodeEdit operations in AI Assistant can overwrite each other

AI Assistant Backend

-

When using AI Assistant, multiple concurrent CodeEdit operations targeting the same file may overwrite each other, resulting in incorrect output. In some cases, only the result of the later operation is preserved while earlier changes are lost.

This not only wastes the user’s credits, but in the worst case can also return broken code.

The issue can be reproduced with the simple prompt attached below. While the prompt intentionally tries to trigger the problem, similar issues can also occur unintentionally during normal use.

This issue appears to be separate from the “Sharing violation on path” error. Although that error may sometimes occur during reproduction, the overwrite problem itself can also happen without any error being reported.

Steps to reproduce:

Send the following prompt in the AI Assistant window:

{{```}}

{{There may be a race condition when multiple Unity.CodeEdit tools are used simultaneously. Please perform the following test:}}

{{1. Generate a simple C# script.}}

{{2. Use two CodeEdit operations simultaneously to modify two different parts of the script.}}

{{3. Verify whether both changes were applied successfully.}}

{{If you encounter a “Sharing violation on path” error, retry the same test. I suspect the race condition can also occur without that error being reported.}}

{{```}}

Actual results: 

AI Assistant confirms the issue.

Expected results: 

AI Assistant fails to reproduce the issue.

Reproducible with versions: 

com.unity.ai.assistant: 2.7.0-pre.3

Unity 6000.3.15f1

Not reproducible with versions: 

Can’t test with versions: 

Tested on (OS): 

macOS 26.4.1

Notes:

  •  

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.