Skip to content

Copilot CLI cannot see the commands you run via ! prefix #1411

@serant

Description

@serant

Describe the feature or problem you'd like to solve

Copilot CLI cannot see the commands you run via ! prefix

Proposed solution

Copilot CLI cannot see ! prefixed commands that I run. This goes for the command itself nor the command output. Not sure if this is a bug or a feature, but it's definitely a limitation of using it for productive workflows. The agent context should have access to your command output.

╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│  ╭─╮╭─╮                                                                                          │
│  ╰─╯╰─╯  GitHub Copilot v0.0.406                                                                 │
│  █ ▘▝ █  Describe a task to get started.                                                         │
│   ▔▔▔▔                                                                                           │
│  Pick a model with /model. Send this session to GitHub with /delegate, and Copilot will create   │
│  a PR. Enter ? to see all commands. Copilot uses AI, so always check for mistakes.               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

● 💡 No copilot instructions found. Run /init to generate a copilot-instructions.md file for this project.

● Folder C:\test has been added to trusted folders.

● $ ls
  ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
  │ No Content                                                                                                                                                                                                                                                                                                           │
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

❯ do you see the output of the command i just ran?

● List shells
  └ <no active shell sessions>

● No, I don't see any previous command output. There are no active shell sessions in my context, and I don't have visibility into commands you ran outside of this session.

  Could you paste the output here or re-run the command so I can help?

❯ Can i run commands in copilot cli that you can see the output of?

● Checking my documentation
  └ # GitHub Copilot CLI Documentation

● Yes! You can run commands directly inside the Copilot CLI that I can see. There are two ways:

   1. Use ! prefix — Type ! followed by your command (e.g., !git status) to execute it in your local shell. However, this runs outside my context and I won't see the output.
   2. Ask me to run it — Just tell me what command you'd like to run (e.g., "run git status"), and I'll execute it using my tools. This way I can see the output and help you with it.

  So the best approach is to ask me to run the command rather than running it yourself outside the session.

Example prompts or workflows

See above

Additional context

GitHub Copilot CLI 0.0.406.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions