"The contents of the immutable workspace have been modified."

It seems since using recent 2025.3 builds (or the 2025.3 IDE?), when I run the IDE and tests in parallel, I often now come across this error which is thousands of lines long and requires me to run ./gradlew clean first and most often also run rm -rf /Users/jo/.gradle/caches/9.0.0/transforms/9ac4c238c3148f6c100ac145b3ded00a

This is time-consuming and not very intuitive.

What would fix this behaviour?

Calculating task graph as no cached configuration is available for tasks: buildPlugin

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':buildSearchableOptions'.
> Failed to query the value of task ':buildSearchableOptions' property 'runtimeDirectory'.
   > A build operation failed.
         The contents of the immutable workspace '/Users/jo/.gradle/caches/9.0.0/transforms/9ac4c238c3148f6c100ac145b3ded00a' have been modified. These workspace directories are not supposed to be modified once they are created. The modification might have been caused by an external process, or could be the result of disk corruption.
     outputDirectory:
      - transformed (Directory, f331d637e243bb5f33522c649faf4bef)
        - pycharmPY-253.28294.166-EAP-SNAPSHOT (Directory, dd09e091d7250f58396cd9785fe48589)
          - .toolbox-ignore (RegularFile, f571933bb948577b1f9f3076fb8fc7c6)
          - bin (Directory, afa1d193b39f1caac4f35e9bdbc30252)


I’m not sure if this will 100% solve your problem, but give it a try

buildSearchableOptions {
    enabled = false
}

Ok, changing platformVersion from 253.28294.166-EAP-SNAPSHOT to 2025.3 AND disabling searchable options seems to help.

I still have this issue, any other ideas?

I’m pretty sure that the fault is when I try to use clion(…), because with intellijIdea(“2025.2.4”) it doesn’t complain, but I need to use a plugin on CLion.

build.gradle.kts

plugins {
    id("java")
    id("org.jetbrains.kotlin.jvm") version "2.1.20"
    id("org.jetbrains.intellij.platform") version "2.10.2"
}

group = "com.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    intellijPlatform {
        defaultRepositories()
    }
}

dependencies {
    intellijPlatform {
        // Use CLion SDK for running/testing the plugin
        clion("2025.3")
        bundledPlugin("com.intellij.clion")
    }
}


intellijPlatform {
    pluginConfiguration {
        ideaVersion {
            // A CLion 2025.3 build number — matches plugin.xml
            sinceBuild = "253.28294.335"
        }
        changeNotes = """
            Initial version
        """.trimIndent()
    }

    // Add this block to handle duplicate files
    buildSearchableOptions = false
}

tasks {
    buildSearchableOptions {
        enabled = false
    }

    withType<JavaCompile> {
        sourceCompatibility = "21"
        targetCompatibility = "21"
    }

    // Add this to handle duplicate files
    prepareSandbox {
        duplicatesStrategy = DuplicatesStrategy.EXCLUDE
    }
}

kotlin {
    compilerOptions {
        jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
    }
}

plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<idea-plugin>

    <id>com.example.plugin_cpp</id>
    <name>Plugin Cpp</name>
    <vendor url="https://www.yourcompany.com">YourCompany</vendor>

    <description><![CDATA[
        A CLion plugin for C/C++ features.
    ]]></description>

    <!-- **Runtime dependency declarations (modules) -->
    <depends>com.intellij.modules.platform</depends>

    <extensions defaultExtensionNs="com.intellij">
        <completion.contributor
                language="C"
                implementationClass="com.example.plugin_cpp.HeheCompletionContributor"/>
        <completion.contributor
                language="C++"
                implementationClass="com.example.plugin_cpp.HeheCompletionContributor"/>
        <completion.contributor
                language="Python"
                implementationClass="com.example.plugin_cpp.HehePythonCompletionContributor"/>
    </extensions>


    <!-- compatibility with CLion builds -->
    <idea-version since-build="253.28294.335" until-build="253.*"/>
</idea-plugin>

Actually I tried with different configuration, but same error.

Here is another thing that I tried and that worked for me:

I tried, but it didn’t work, In the end, it seems that the fix for me was switching from the MS JDK to the JetBrains JDK (not sure if this is correlated).

Thanks :slight_smile:

EDIT: I Have the issue again.

I’d like to bring this issue to attention again. It happens so often when using AI agents that also run tests while the plugin is running.
I am looking for a stable way to avoid that. A different gradle cache for the agent? I don’t know.

Who can help?

@robert.novotny maybe?