Code Interpreter Reruns Old Code After Fixing Errors

Hi,

As part of a task, the agent writes, edits, and runs code using Code Interpreter.

When there’s an error during execution, the agent successfully fixes the code (I could see the changes were applied). However, when rerunning, it appears to execute the old version of the code instead of the updated one, causing the same error to occur again.

Why does this happen?

I’ve already tried disabling caching and memory, running it in Docker and locally, and in unsafe mode, but the issue persists.