Skip to content

[Bug] TypeError: Cannot read properties of undefined (reading 'filter') #428

Description

@tamasmiklossy

Environment

  • OS: Windows
  • Eclipse Version: 2026-06 (4.40.0)
  • Plugin Version: 0.21.0.202608060743

Describe the bug
The following error occurs in the Agent mode when there is no project in the workspace:

!ENTRY org.eclipse.lsp4e 4 0 2026-08-26 07:45:09.023
!MESSAGE [LS:GitHub Copilot Language Server][Error]	[chat] Error processing turn 72df12fd-e941-4394-adb4-2b5917d14ed7 TypeError: Cannot read properties of undefined (reading 'filter') (at tsx element AgentPrompt > UserMessage > SubagentListPrompt)
    at y0.collect (C:\snapshot\copilot-language-server-internal\dist\main.js:2411:12762)
    at t.listCustomAgents (C:\snapshot\copilot-language-server-internal\dist\main.js:2411:23507)
    at async $de.getAgents (C:\snapshot\copilot-language-server-internal\dist\main.js:3333:954)
    at async $de.getAgentsForModelDispatch (C:\snapshot\copilot-language-server-internal\dist\main.js:3333:1202)
    at async Itt.renderCopilot (C:\snapshot\copilot-language-server-internal\dist\main.js:3333:3037)
    at async annotateError (C:\snapshot\copilot-language-server-internal\dist\main.js:69:4311)
    at async C:\snapshot\copilot-language-server-internal\dist\main.js:67:29695
    at async Promise.all (index 0)
    at async jZe._processPromptPieces (C:\snapshot\copilot-language-server-internal\dist\main.js:67:29606)
    at async jZe._processPromptRenderPiece (C:\snapshot\copilot-language-server-internal\dist\main.js:67:30200)

!ENTRY org.eclipse.lsp4e 4 0 2026-08-26 07:45:09.024
!MESSAGE [LS:GitHub Copilot Language Server][Error]	[agenticTurnProcessor] Error in processing turn 72df12fd-e941-4394-adb4-2b5917d14ed7 TypeError: Cannot read properties of undefined (reading 'filter') (at tsx element AgentPrompt > UserMessage > SubagentListPrompt)
    at y0.collect (C:\snapshot\copilot-language-server-internal\dist\main.js:2411:12762)
    at t.listCustomAgents (C:\snapshot\copilot-language-server-internal\dist\main.js:2411:23507)
    at async $de.getAgents (C:\snapshot\copilot-language-server-internal\dist\main.js:3333:954)
    at async $de.getAgentsForModelDispatch (C:\snapshot\copilot-language-server-internal\dist\main.js:3333:1202)
    at async Itt.renderCopilot (C:\snapshot\copilot-language-server-internal\dist\main.js:3333:3037)
    at async annotateError (C:\snapshot\copilot-language-server-internal\dist\main.js:69:4311)
    at async C:\snapshot\copilot-language-server-internal\dist\main.js:67:29695
    at async Promise.all (index 0)
    at async jZe._processPromptPieces (C:\snapshot\copilot-language-server-internal\dist\main.js:67:29606)
    at async jZe._processPromptRenderPiece (C:\snapshot\copilot-language-server-internal\dist\main.js:67:30200)

To Reproduce
Steps to reproduce the behavior:

  1. Open a new empty workspace with no project imported into it
  2. Ensure on the Chat window Agent mode is selected
  3. Ask a question to Copilot e.g: "What day is today?"
  4. See error

Expected behavior
No error should appear

Screenshots

Image

Additional context
The problem does not occur if Ask mode is selected

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions