Remove a Ruflo-tracked agent from the registry and free its swarm slot. Use when you need to (a) clean up a spawned agent so its cost-tracking row finalizes, (b) reclaim a swarm-topology slot for another agent, or (c) end a stuck agent without restarting the whole swarm. For one-shot Task tool in...
AI agents call agent_terminate to permanently remove resources in Claude Flow — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
Terminating an agent removes it from the registry and finalizes its cost-tracking row. This action cannot be undone — the agent's state, slot, and tracking data are permanently finalized/freed. While not deleting user data, it irreversibly destroys a running computational entity and its associated registry record, placing it firmly in the Destructive category.
From the tool's definition 'Remove a Ruflo-tracked agent from the registry and free its swarm slot' and 'end a stuck agent without restarting the whole swarm' — the agent is removed/terminated and its registry entry finalized, which is irreversible.
Attacks that exploit this kind of access
Remove a Ruflo-tracked agent from the registry and free its swarm slot. Use when you need to (a) clean up a spawned agent so its cost-tracking row finalizes, (b) reclaim a swarm-topology slot for another agent, or (c) end a stuck agent without restarting the whole swarm. For one-shot Task tool invocations that already self-terminate, this tool is not needed. Pair with agent_list first to confirm the agentId. It is categorised as a Destructive tool in the Claude Flow MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
Register the Claude Flow MCP server in PolicyLayer and add a rule for agent_terminate: 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 Claude Flow. Nothing to install.
agent_terminate 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 agent_terminate 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 agent_terminate. 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.
agent_terminate is provided by the Claude Flow MCP server (claude-flow). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.