github / github/copilot-cli

Copilot CLI cannot see the commands you run via `!` prefix

未关闭
#1,411 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:tools
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### 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, 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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。