github / github/copilot-cli

Custom agent plan-mode sessions leave the Plan panel blank (plan_content empty while summary is populated)

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

还没有人认领这个 Issue。

triage
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Description

When a user-selected custom agent (front matter: disable-model-invocation: true, infer: false, invoked explicitly by name rather than by inference) calls the built-in exit_plan_mode tool, the Plan side panel renders the recommended-action bubbles but no plan text. The default (built-in) agent does not have this problem -- its Plan panel renders correctly.

Steps to reproduce

  1. Create or select a custom agent with disable-model-invocation: true and user-invocable: true in its front matter.
  2. Invoke that agent explicitly by name (not via inference) in plan mode.
  3. Have the agent call exit_plan_mode with a full plan in the summary argument.
  4. Observe the Plan panel in the UI: it shows the recommended-action bubbles (e.g. "autopilot", "interactive", "exit_only") but the plan text area is blank.

Root cause (as far as I could verify)

Reading the session's pending plan state directly shows two separate fields on pending_plan:

  • summary -- fully populated with the complete plan text passed to exit_plan_mode.
  • plan_content -- empty string ("").

The Plan panel UI appears to render from plan_content, not summary. For default-agent sessions, plan_content gets populated (seemingly mirrored from summary) automatically. For custom, explicitly-selected agent sessions, that mirroring does not happen, leaving plan_content empty and the panel blank even though the underlying plan data is intact and was submitted correctly per the documented exit_plan_mode contract.

This is not model-dependent -- the same custom agent reproduces the issue regardless of model (Auto vs. an explicit model). It tracks the agent-invocation path (default agent vs. user-selected custom agent), not model selection.

Expected behavior

Regardless of whether a default or custom agent invokes exit_plan_mode, the Plan panel should render the full plan text from summary.

Impact

Plan-mode approval becomes unusable for custom agents: there is no readable plan to approve/reject against in the panel, even though the agent followed the documented contract exactly (full plan in summary).

Environment

  • Windows, PowerShell v6+
  • Reproduced with a custom repository agent invoked explicitly by name in a worktree-backed project session.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先跟踪 custom-agent 通过 exit_plan_mode 和 pending_plan 状态的调用路径,然后将其与 default-agent 的路径进行比较。确认 summary 在哪里填充,以及为什么 plan_content 仍为空;当 Plan 面板为明确选择的 custom agents 渲染提交的计划文本时,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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