github / github/copilot-cli

[Bug] --interactive startup prompt is silently dropped with a local plugin custom agent

未关闭
#4,723 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:agents area:non-interactive area:plugins
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Describe the bug

-i/--interactive <prompt> silently drops the startup prompt when Copilot CLI
is launched with a custom agent from local plugins. The TUI starts and the
requested agent is selected, but the prompt supplied on the command line is
never submitted. The session remains at zero turns.

This is using the standard GitHub Copilot provider, not a custom/BYOK provider.

Affected version
GitHub Copilot CLI 1.0.83-5
Windows 11, x86_64
Windows Terminal / PowerShell
Steps to reproduce the behavior
  1. Load a local plugin that contributes a custom agent.

  2. Start an interactive session with both the agent and an initial prompt:

    copilot `
      --plugin-dir "$HOME\git\bstack\bstack" `
      --plugin-dir "$HOME\git\bstack\workiq" `
      --agent bstack:Architect `
      --interactive "<ordinary prompt text>"
    
  3. Observe that the TUI starts and selects bstack:Architect, but the supplied
    prompt is not executed.

  4. Manually entering a prompt after startup works.

Expected behavior

The prompt passed to -i/--interactive should automatically execute as the
first turn, as documented by copilot --help:

-i, --interactive <prompt>
    Start interactive mode and automatically execute this prompt
Additional context

The debug log confirms that argument processing and custom-agent selection
succeeded:

"agent_name": "bstack:Architect"
"agent_display_name": "Architect"

However, the same process shut down with:

"turn_count": 0

There is no corresponding user.message, assistant turn start, or model call
for the command-line prompt. This rules out prompt interpretation or tool
execution as the failure point: the --interactive argument value never
becomes a user turn.

This resembles #4258, but that report was limited to custom/BYOK providers and
is closed. This reproduction uses the standard GitHub provider and a local
plugin custom agent on 1.0.83-5, so the failure is either a regression or a
broader unfixed startup-argument path.

#4592 may also be related because it documents custom-agent initialization
ordering differences between interactive and prompt modes.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用本地插件 custom agent 重现文档中的 -i/--interactive 命令,然后跟踪 CLI 启动参数的处理流程,直到 agent 选择。完成的标准是:提供的 prompt 成为第一个用户回合并自动执行,同时覆盖 custom-agent 路径。

由索引模型根据 Issue 内容生成。

评估

技术栈
github, shell
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

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