Filter: gk/block-mcp/agent/remove-on-uninstall
Keep the AI agent account alive across an uninstall/reinstall cycle.
On uninstall the plugin cleans up after itself: it deletes the agent user, revokes its credentials, and removes the custom role. Return false to preserve that account instead — ideal when you provision credentials out-of-band, ship the agent as part of a fleet image, or simply don't want a temporary deactivation to force every connected client to reconnect.
Parameters
| Name | Type | Description |
|---|---|---|
| $remove | bool | Whether to remove the agent on uninstall. Default true. |
Example
// Survive reinstalls so connected clients keep working.
add_filter( 'gk/block-mcp/agent/remove-on-uninstall', '__return_false' );
Since
Source
Defined in wordpress-plugin/gk-block-api/includes/class-agent-provisioner.php at line 328