Skip to content

API paths at the beginning of a natural-language prompt are interpreted as slash commands #5429

Description

@bingbing-gui

Describe the bug

Description

When a natural-language prompt begins with an API endpoint such as /chat-sessions, Copilot CLI interprets the endpoint as a slash command and reports an error instead of sending the request to the agent.

This interrupts a common coding workflow: copying an API path from the agent's previous response and using it at the beginning of a follow-up request.

Steps to reproduce

Start an interactive Copilot CLI session.

Enter the following prompt:

/chat-sessions 这个查询列表的 API,请不要返回 session_content 字段,等点击某个会话时再加载。

English equivalent:

/chat-sessions is the session-list API. Please exclude session_content from the list response and load it only when a session is selected.

Submit the prompt.

Actual behavior

The CLI displays:

Unknown command: /chat-sessions

The request is rejected as an unknown command rather than processed as a coding request. The attached screenshot shows this error occurring twice.

Expected behavior

There should be a clear way to submit a prompt beginning with a literal API path.

If rejecting unknown slash commands is intentional, the error should explain how to send the input as plain text, or offer an option to do so.

Environment

OS: Windows

Terminal: Windows Terminal

Copilot CLI version: [paste the output of copilot --version]

Model displayed: GPT-5.3-Codex

Mode: Interactive, Manual Approval

Workaround

Rephrase the prompt so the API path is not at the beginning, for example:

Please modify the /chat-sessions API to exclude session_content from the list response.

Screenshot

image

Affected version

v1.0.109

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

Activity

  1. added theissue type on Nov 12, 2026
  2. added
    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text input
    and removed on Nov 12, 2026
  3. changed the issue type fromtoon Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text input

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions