Project.checksum in build folder ruins the build

I’m finding myself deleting .pio/build/project.checksum file before every build. If it’s there, the build fails with the error:

*** [/Users/<Username>/.platformio/packages/framework-arduinoststm32/variants/STM32F1xx/F103C8T_F103CB(T-U)/PeripheralPins.c] /Users/<Username>/Documents/PlatformIO/Projects/<Project Name>/.pio/build/bluepill_f103c8/.sconsign39.dblite: No such file or directory

Using PIO v3.3.1 in VSCODE on Mac. Latest release fails the build this project at all failing with the same error regardless the checksum file.

Example projects building correctly though, so it suggests that the problem is related to settings. just not clear which ones.

platformio.ini just in case:

[env]
platform = ststm32
framework = arduino

[env:bluepill_f103c8]
board = bluepill_f103c8
debug_tool = jlink
upload_protocol = jlink
lib_deps = 
	Wire
	u8g2

What’s the version of the PIO core? CLIpio --version

It seems that antivirus tools cause problems for PlatformIO deleting temporary files and internal DBs.

Do you use any espionage antivirus software? (Kaspersky, dr.web, etc)?

pio --version
PlatformIO Core, version 6.1.11

I also don’t use third party antivirus on my mac

Could you run the following CLI command in the project?

pio pkg update

Remove .pio folder from the project. Start a build process again.

Well, it said everything up to date, but seems like problem disappeared.
Thank you.

Well, this problem is deeper.

It seems that VSCode extension is triggering several concurrent pio actions that interfere with each other and effectively deletes files in .pio folder. then different actions fail in different stages causing random crashes of the stages.

Do you have multiple VSCode windows with the same project/workspace?

No, i’m running single window.

I’m starting to suspect that there is a process in PlatformIO IDE that cleans up .pio folder. it breaks if .pio folder deleted but ocasionally starts again.