Before opening, please confirm:
Operating System
Ubuntu 24.04 LTS 0.1.25
Kiro Version
0.1.25
Bug Description
**The Kiro editor becomes highly unresponsive and frequently freezes. The developer console is flooded with errors pointing to the kiro.kiro-agent extension as the root cause.
The logs indicate that the extension is causing the extension host to become unresponsive, leading to aborted operations (AgentAbortedException). A MaxListenersExceededWarning strongly suggests a memory leak related to an improper handling of AbortSignal listeners, which is likely the cause of the performance degradation and crashes.**
Steps to Reproduce
- Open a project folder in Kiro.
- Use the editor for a period of time, especially with features that rely on the kiro.kiro-agent.
- observe stuttering, lag, and temporary freezes in the UI.
- Open the Developer Tools (Help > Toggle Developer Tools) and view the console.
- See the errors related to the unresponsive extension host and the kiro.kiro-agent.
Expected Behavior
Expected Behavior
The editor should remain stable and responsive during use. The kiro.kiro-agent extension should operate without causing memory leaks, crashes, or making the extension host unresponsive.
Conversation ID
88882037-298b-4650-a96a-26fe1bb4a01b
Additional Context
Logs
INFO UNRESPONSIVE extension host: received responsive event and cancelling profiling session
workbench.desktop.main.js:617 [Extension Host] rejected promise not handled within 1 second: AgentAbortedException: Operation was aborted by user or system
Dzi @ workbench.desktop.main.js:617
workbench.desktop.main.js:617 [Extension Host] stack trace: AgentAbortedException: Operation was aborted by user or system
at AgentExecution3.completeWithAbort (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:748009:24)
at AgentExecution3. (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:97739:32)
at AgentExecution3.abort (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:748082:10)
at /usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:755341:25
at async AgentController2.publishAgentEvent (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:748756:7)
at async AgentExecution3.yield (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:748037:5)
at async _ActionRunCommand.handle (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:740988:7)
at async ToolExecuteBash.handle (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:741121:17)
at async ToolExecuteBash.handleInput (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:692028:27)
at async ToolExecuteBash.call (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:684914:18)
at async attemptProcessingChunkStream2 (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:745437:20)
at async RunnableCallable. (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:745365:22)
at async RunnableCallable.invoke (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:735028:21)
at async _RunnableSequence.invoke (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:674050:29)
at async _runWithRetry (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:737676:17)
at async PregelRunner._executeTasksWithRetry (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:737972:27)
at async PregelRunner.tick (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:737775:66)
at async CompiledStateGraph._runLoop (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:739238:9)
at async createAndRunLoop (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:739144:9)
Dzi @ workbench.desktop.main.js:617
workbench.desktop.main.js:631 [kiro.kiroAgent]Operation was aborted by user or system
$onExtensionRuntimeError @ workbench.desktop.main.js:631
workbench.desktop.main.js:631 AgentAbortedException: Operation was aborted by user or system
at AgentExecution3.completeWithAbort (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:748009:24)
at AgentExecution3. (/usr/share/kiro/resources/app/extensions/kiro.kiro-agent/dist/extension.js:97739:32)
...
workbench.desktop.main.js:617 [Extension Host] Error loading session: Error: Session file /home/shabev/.config/Kiro/User/globalStorage/kiro.kiroagent/workspace-sessions/L2hvbWUvc2hhYmV2L0RvY3VtZW50cy9Db2RlX1Byb2plY3RzL29ic2lkaWFu/ca0849f9-1ae2-4116-b5fe-7129826fda9b.json does not exist
...
workbench.desktop.main.js:35 ERR [Extension Host] (node:27060) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
...
workbench.desktop.main.js:35 INFO Extension host (LocalProcess pid: 27060) is unresponsive.
workbench.desktop.main.js:10963 Extension Host
workbench.desktop.main.js:10963 Debugger attached.
workbench.desktop.main.js:35 INFO UNRESPONSIVE extension host: starting to profile NOW
workbench.desktop.main.js:35 INFO Extension host (LocalProcess pid: 27060) is responsive.
workbench.desktop.main.js:35 INFO UNRESPONSIVE extension host: received responsive event and cancelling profiling session
...
workbench.desktop.main.js:35 WARN UNRESPONSIVE extension host: 'kiro.kiroagent' took 61.47982281016911% of 1149.586ms, saved PROFILE here: 'file:///tmp/exthost-3e68ca.cpuprofile'
...
workbench.desktop.main.js:35 ERR Could not find category with ID: SetupAccessibility: Error: Could not find category with ID: SetupAccessibility