Skip to content

/clear not only clears the session but also all the MCP tools #2255

@danielringwald-aza

Description

@danielringwald-aza

Describe the bug

Using /clear to clear the session removes all the MCP tools as well. The CLI client cannot use the MCP tools right after a session clear which requires a Copilot restart.

Workaround is to run /clear and /restart in conjunction then MCPs are restarted and the tools are loaded.

Affected version

1.0.11

Steps to reproduce the behavior

  1. Start fresh session on copilot (shell command: copilot)
  2. Prompt: "List all available MCP tools" -> expected to list the tools defined by the MCP
  3. Clear session (copilot command: /clear)
  4. Prompt: "List all available MCP tools" -> Copilot tries to search mcp-config files or try to query localhost and complains that it can't find the expected tools

Expected behavior

MCP tools should still be available after running /clear.

Additional context

Operating system: MacOS Tahoe 26.3
Shell: zshell

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions