Close the workspace the CALLING pane runs in (identify.caller.workspace_ref) — NOT the focused one, which may be a workspace the user just clicked into. First call previews the resolved target; call again with confirm=true to actually close. Refuses if there is no calling pane (invoked outside a ...
AI agents call cmux_close_current_workspace to permanently remove resources in Cmux — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
Closing a workspace destroys all terminal panes, running processes, and session state within it. This cannot be undone once confirmed. The two-step confirmation mechanism (preview then confirm=true) further underscores that this is a destructive, irreversible operation. Severity is high because misuse could terminate an active working environment with multiple running processes.
From the tool's definition 'Close the workspace' and 'call again with confirm=true to actually close' — closing a workspace is an irreversible destructive action that terminates all panes and state within that workspace.
Attacks that exploit this kind of access
Close the workspace the CALLING pane runs in (identify.caller.workspace_ref) — NOT the focused one, which may be a workspace the user just clicked into. First call previews the resolved target; call again with confirm=true to actually close. Refuses if there is no calling pane (invoked outside a cmux terminal) rather than guessing from focus. It is categorised as a Destructive tool in the Cmux MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
Register the Cmux MCP server in PolicyLayer and add a rule for cmux_close_current_workspace: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Cmux. Nothing to install.
cmux_close_current_workspace is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the cmux_close_current_workspace rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for cmux_close_current_workspace. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
cmux_close_current_workspace is provided by the Cmux MCP server (puchkoff/cmux-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →