fix: stop coding agents from passing a name to cluster.delete - #347
Open
azygoss wants to merge 1 commit into
Open
fix: stop coding agents from passing a name to cluster.delete#347azygoss wants to merge 1 commit into
azygoss wants to merge 1 commit into
Conversation
monk.cluster.delete always destroys the currently selected cluster. clusterName/clusterId are extra properties (additionalProperties: true) and are silently ignored, so a call that looks like "delete X" still deletes the selected cluster. Teach every agent instruction surface to list/switch/confirm first, and never pass a name. Fixes monk-io#345
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
monk.cluster.deletealways destroys the currently selected cluster. Its schema has noclusterName/clusterId;additionalProperties: truemeans those keys are accepted and silently ignored.cluster.delete {clusterName: "other"}still deletes whatever is selected. That destroyed a live 2-node cluster while hunting (approval title named the selected cluster; the agent had narrated the bogus name).Root cause
The MCP tool is "delete the selected cluster". The plugin skills currently say
switchthendelete, which is correct if no name is passed. Agents given "delete cluster X" passclusterNameanyway. The extra property does not retarget the call.The swallow lives in monk-agent (generated plugin;
GENERATED.md). The skill/agent markdown is what coding agents execute, which is the failure mode in this repository.What changed
skills/monk/SKILL.mdand the packagedplugins/monkcopyskills/monk/references/agent-workflow.md(and packaged copy)agents/monk-deployer.md,agents/monk-frontman.mdSKILL.md+rules/monk-safety.mdtests/cluster-delete-selected-guard.sh— copies stay identical; every surface mentions selected-cluster +clusterNameValidation
The monk-agent RPC still ignores extra properties; a follow-up in monk-agent should reject unknown target names instead of deleting the selection. Until that lands, this is the guard that stops coding agents from walking users into the trap.
Fixes #345