Custom agent plan-mode sessions leave the Plan panel blank (plan_content empty while summary is populated)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando il percorso di invocazione del custom-agent attraverso exit_plan_mode e lo stato pending_plan, quindi confrontalo con il percorso del default-agent. Conferma dove viene valorizzato summary e perché plan_content rimane vuoto; il lavoro è completato quando il pannello Plan visualizza il testo del piano inviato per i custom agents selezionati esplicitamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100