You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Panes that Prowl launched for another agent — a prompted Profile launch (prowl create pane … --profile … --prompt -), a re-dispatch target (#733 / #741), and soon a workflow role (docs-ai 063 launch / close: steps) — hold results that were written for the coordinating agent, not for a person. When that agent finishes, the pane shows done, and closing it now triggers the close-confirmation sheet ("active agent work or an unseen agent result", TerminalCloseProtectionReason.agentActive in TerminalCloseConfirmationPolicy). In an automated flow nobody is there to answer the sheet: prowl close --pane <id> from the coordinator returns ok: false and the pane lingers until a human clicks. The B1 review loop hit this on every round (a Pi reviewer split closed after its dispatch receipt was already read).
prowl close --force skips the policy today, but it also skips the protection that is wanted — a working agent, a human-launched pane with a result nobody read — and it asks the caller to know which case it is in.
Proposed behavior
Treat the result as seen when the pane's dispatch has a terminal receipt (succeeded / failed / abandoned): the coordinator already consumed it through agents wait --dispatch. Closing such a pane (prowl close without --force, the workflow close: step, the app's own close) does not prompt while the agent is idle/done.
Keep the confirmation for working and blocked agents, for long-running commands, and for panes whose agent was not launched or re-dispatched by Prowl (a human may still want to read the screen).
Alternatively for the workflow runner: default to not closing automation panes at all (the spec already says Cancel never closes panes) and make close: explicit opt-in — but the CLI recipe still needs the first point so prowl close behaves in scripts.
The alert itself is under-informative
Independently of the automation rule, the sheet a person does see says only "This will close N pane(s) in “” with active agent work or an unseen agent result." (TerminalCloseConfirmationPolicy.informativeMessage). That is not enough to decide: it should name which tab (title and tN handle) and which agent is running or holds the unseen result — runtime/Profile name plus its state (working / blocked / done), and for a dispatched pane whether a receipt exists. With several splits and background tabs, "1 pane with active agent work" cannot be mapped to anything on screen.
Non-goals
Changing the protection for human-launched panes or the long-running-command threshold.
Closing panes automatically after a dispatch completes.
Acceptance
After agents wait --dispatch <id> returns a terminal receipt, prowl close --pane <pane> (no --force) closes the pane without a sheet; the same pane while working still prompts.
docs/components/cli.md (prowl close) and the close contract describe the rule; the policy tests cover both branches.
The confirmation sheet lists every protected pane with its tab (title, tN) and agent (name, state, receipt state when dispatched), so a person can tell what they are about to close.
Why
Panes that Prowl launched for another agent — a prompted Profile launch (
prowl create pane … --profile … --prompt -), a re-dispatch target (#733 / #741), and soon a workflow role (docs-ai 063launch/close:steps) — hold results that were written for the coordinating agent, not for a person. When that agent finishes, the pane showsdone, and closing it now triggers the close-confirmation sheet ("active agent work or an unseen agent result",TerminalCloseProtectionReason.agentActiveinTerminalCloseConfirmationPolicy). In an automated flow nobody is there to answer the sheet:prowl close --pane <id>from the coordinator returnsok: falseand the pane lingers until a human clicks. The B1 review loop hit this on every round (a Pi reviewer split closed after its dispatch receipt was already read).prowl close --forceskips the policy today, but it also skips the protection that is wanted — aworkingagent, a human-launched pane with a result nobody read — and it asks the caller to know which case it is in.Proposed behavior
succeeded/failed/abandoned): the coordinator already consumed it throughagents wait --dispatch. Closing such a pane (prowl closewithout--force, the workflowclose:step, the app's own close) does not prompt while the agent is idle/done.workingandblockedagents, for long-running commands, and for panes whose agent was not launched or re-dispatched by Prowl (a human may still want to read the screen).close:explicit opt-in — but the CLI recipe still needs the first point soprowl closebehaves in scripts.The alert itself is under-informative
Independently of the automation rule, the sheet a person does see says only "This will close N pane(s) in “” with active agent work or an unseen agent result." (
TerminalCloseConfirmationPolicy.informativeMessage). That is not enough to decide: it should name which tab (title andtNhandle) and which agent is running or holds the unseen result — runtime/Profile name plus its state (working/blocked/done), and for a dispatched pane whether a receipt exists. With several splits and background tabs, "1 pane with active agent work" cannot be mapped to anything on screen.Non-goals
Acceptance
agents wait --dispatch <id>returns a terminal receipt,prowl close --pane <pane>(no--force) closes the pane without a sheet; the same pane whileworkingstill prompts.pendingrecord still prompts.docs/components/cli.md(prowl close) and the close contract describe the rule; the policy tests cover both branches.tN) and agent (name, state, receipt state when dispatched), so a person can tell what they are about to close.Refs
supacode/Features/Terminal/Models/TerminalCloseConfirmationPolicy.swift,TerminalCloseConfirmationGate.swiftdsl-spec.md§4close:step and §10 Cancel