Custom agent plan-mode sessions leave the Plan panel blank (plan_content empty while summary is populated)
還沒有人認領這個 Issue。
- 主要語言
- 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
- Create or select a custom agent with
disable-model-invocation: trueanduser-invocable: truein its front matter. - Invoke that agent explicitly by name (not via inference) in plan mode.
- Have the agent call
exit_plan_modewith a full plan in thesummaryargument. - 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 toexit_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.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 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