Skip to content

.Net: Bug: VS Code extension's onFileSystem:file activation event freezes renderer during Copilot Chat responses #13586

@Amerzel

Description

@Amerzel

Describe the bug

The Semantic Kernel VS Code extension registers onFileSystem:file in its activationEvents (package.json). This causes VS Code's
renderer process to freeze completely when GitHub Copilot Chat renders responses containing inline file references. Each file reference
triggers an onWillActivateByEvent: onFileSystem:file event, flooding the renderer's UI thread. In a single session, over 5,600 of these
events were logged, comprising 22% of all renderer log lines. The renderer stops processing entirely while the extension host continues
running — the UI becomes permanently frozen and must be force-killed.

To Reproduce

  1. Install the Semantic Kernel VS Code extension (v0.13.0)

  2. Open a workspace containing source files (e.g., a C# project)

  3. Open GitHub Copilot Chat

  4. Ask a question about the codebase that causes Copilot to reference multiple files in its response (e.g., "How does the agent
    registration work?")

  5. VS Code UI freezes and becomes completely unresponsive

Expected behavior

VS Code should remain responsive while Copilot Chat renders its response. The onFileSystem:file activation event should not fire
repeatedly for every file URI accessed during chat rendering.

Screenshots

N/A — the UI freezes completely. Renderer log attached showing the onWillActivateByEvent flood pattern.

Platform

  • Language: C#
  • Source: VS Code Marketplace, Semantic Kernel extension v0.13.0
  • AI model: GitHub Copilot (GPT-4o / Claude Sonnet)
  • IDE: VS Code
    1.109.5 (x64)
  • OS: Windows 11 Enterprise (10.0.26200.0)

Additional context

  • Running VS Code with --log trace captures the issue clearly in renderer.log.
  • The renderer log shows a repeating pattern: ChatListItemRenderer#doNextProgressiveRender (rendering 82-117 parts) immediately
    followed by ~15 rapid-fire onWillActivateByEvent: onFileSystem:file events, repeating until the renderer thread is starved and stops.
  • The extension host (exthost.log) continues running for minutes after the renderer freezes, confirming the UI thread is blocked, not
    the process.
  • Disabling the Semantic Kernel extension (--disable-extension ms-semantic-kernel.semantic-kernel) completely resolves the freeze.
  • The root cause appears to be "onFileSystem:file" in the extension's activationEvents in package.json. The file scheme is used by
    virtually all local file operations in VS Code, making this an extremely broad activation trigger.

VSCode renderer Log:

renderer.log (last 50 lines — log ends here, renderer is frozen):

   2026-02-23 10:54:53.965 [trace] ChatListItemRenderer#doNextProgressiveRender: START progressive render, index=1
   2026-02-23 10:54:53.965 [trace] ChatListItemRenderer#getNextProgressiveRenderContent: Want to render 721 at 80 words/s, counting...
   2026-02-23 10:54:53.965 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 7: Want to render 721 words and found 47
   words. Total words in chunk: 47
   2026-02-23 10:54:53.966 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 19: Want to render 674 words and found
  39 words. Total words in chunk: 39
   2026-02-23 10:54:53.966 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 29: Want to render 635 words and found
  42 words. Total words in chunk: 42
   2026-02-23 10:54:53.969 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 39: Want to render 593 words and found
  44 words. Total words in chunk: 44
   2026-02-23 10:54:53.969 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 80: Want to render 549 words and found
  549 words. Total words in chunk: 580
   2026-02-23 10:54:53.972 [trace] ChatListItemRenderer#getNextProgressiveRenderContent: Want to render 721 words. Rendering 721 words.
  Buffer: 17 words
   2026-02-23 10:54:53.973 [trace] ChatListItemRenderer#doNextProgressiveRender: doing progressive render, 82 parts to render
   2026-02-23 10:54:53.973 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.973 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.974 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.974 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.974 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.974 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.977 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.979 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.980 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.980 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.980 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.980 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.980 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.980 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.981 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:53.981 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.020 [trace] ChatListItemRenderer#doNextProgressiveRender: START progressive render, index=1
   2026-02-23 10:54:54.020 [trace] ChatListItemRenderer#getNextProgressiveRenderContent: Want to render 724 at 80 words/s, counting...
   2026-02-23 10:54:54.021 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 7: Want to render 724 words and found 47
   words. Total words in chunk: 47
   2026-02-23 10:54:54.021 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 19: Want to render 677 words and found
  39 words. Total words in chunk: 39
   2026-02-23 10:54:54.021 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 29: Want to render 638 words and found
  42 words. Total words in chunk: 42
   2026-02-23 10:54:54.021 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 39: Want to render 596 words and found
  44 words. Total words in chunk: 44
   2026-02-23 10:54:54.021 [trace] ChatListItemRenderer#getNextProgressiveRenderContent:   Chunk 80: Want to render 552 words and found
  552 words. Total words in chunk: 580
   2026-02-23 10:54:54.021 [trace] ChatListItemRenderer#getNextProgressiveRenderContent: Want to render 724 words. Rendering 724 words.
  Buffer: 14 words
   2026-02-23 10:54:54.022 [trace] ChatListItemRenderer#doNextProgressiveRender: doing progressive render, 82 parts to render
   2026-02-23 10:54:54.022 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.022 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.022 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.025 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.025 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.028 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.028 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.028 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.029 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.029 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.029 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.029 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.029 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.030 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.030 [trace] onWillActivateByEvent:  onFileSystem:file
   2026-02-23 10:54:54.030 [trace] onWillActivateByEvent:  onFileSystem:file

   Total renderer.log stats: 25,583 lines, 5,633 (22%) are onWillActivateByEvent: onFileSystem:file
   The renderer log ends here — the UI thread is frozen. The extension host (exthost.log) continued running for minutes after.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETIssue or Pull requests regarding .NET codebugSomething isn't workingtriage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions