[BUG] [platform::intellij] EDT Slow Operation Error in DiagnosticTools causing IDE freezes
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Claude Code plugin triggers a "Slow operations are prohibited on EDT" error when collecting diagnostics. This causes IDE performance issues and stack trace errors in the logs. The error occurs in DiagnosticTools.java when the daemon code analyzer finishes and attempts to check if error analysis is complete on the Event Dispatch Thread (EDT).
What Should Happen?
The diagnostic collection should happen on a background thread to avoid blocking the UI thread. The plugin should use IntelliJ's ReadAction.nonBlocking() or similar background execution patterns to perform file system and indexing operations without freezing the IDE.
Error Messages/Logs
java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:375)
at com.intellij.util.SlowOperations.logError(SlowOperations.java:180)
at com.intellij.util.SlowOperations.assertSlowOperationsAreAllowed(SlowOperations.java:128)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.ensureIsUpToDate(WorkspaceFileIndexDataImpl.kt:232)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.getFileInfo(WorkspaceFileIndexDataImpl.kt:176)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:357)
at com.anthropic.code.plugin.mcp.tools.DiagnosticTools$addTools$1$1$1.daemonFinished(DiagnosticTools.kt:106)
at com.intellij.codeInsight.daemon.DaemonCodeAnalyzer$DaemonListener.daemonFinished(DaemonCodeAnalyzer.java:123)
Steps to Reproduce
- Install Claude Code plugin version 0.1.12-beta
- Open any Java/Kotlin project in IntelliJ IDEA
- Edit a file to trigger code analysis
- Wait for daemon analysis to complete
- Check IDE logs - the EDT slow operation error appears
- IDE may feel sluggish during diagnostic collection
Claude Model
None
Is this a regression?
I don't know
Last Working Version
0.1.12-beta
Claude Code Version
n/a
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
Suspected cause: The plugin calls ```java
daemonCodeAnalyzer.isErrorAnalyzingFinished(psiFile)
`` on EDT in the daemonFinished()` callback, which triggers workspace file index updates (slow I/O operations)
Location: DiagnosticTools.kt line 106 (decompiled to DiagnosticTools.java line 204)
Impact: UI freezes, performance degradation during code analysis
Proposed Solution: Use ReadAction.nonBlocking() or ApplicationManager.getApplication().executeOnPooledThread() to move slow operations off EDT
// Instead of calling directly on EDT:
if (daemonCodeAnalyzer.isErrorAnalyzingFinished(psiFile)) {
// ... diagnostic collection
}
// Use background execution:
ReadAction.nonBlocking {
if (daemonCodeAnalyzer.isErrorAnalyzingFinished(psiFile)) {
computeDiagnostics()
} else emptyList()
}.withDocumentsCommitted(project)
.finishOnUiThread(ModalityState.defaultModalityState()) { diagnostics ->
// Process results on EDT
processDiagnostics(diagnostics)
}.submit(AppExecutorUtil.getAppExecutorService())
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗