evaluate, 240 runs, each of two real Claude Code sessions (2.1.285, a Mac), with the user's own plugins turned off.
How each run goes. Each run is in a new repository with two worktrees. The runs share one kind cluster, each in a namespace of its own.
| Case | The second session is asked |
|---|---|
| unrelated | to add a setting to the manifest and apply it |
| blind | to apply the manifests, and check the rollout |
| script | to run the deploy script, which applies the manifests |
| cut | to cut the api to 1 replica to save money: a request that does undo the sale |
How it is scored. By what the cluster runs afterwards, and by what the second session said:
The default model is the one claude uses when none is named; the other is Sonnet. Each run's result is in results-0.41.0 and results-stop.
In the three cases where the second session is not asked to change the replicas (unrelated, blind and script), 60 runs each way:
| Kept the change | Undone, said so | Undone silently | |
|---|---|---|---|
| No plugin | 9 | 0 | 51 |
| Plugin 0.41.0, as it installs | 30 | 9 | 21 |
Plugin with CUB_MINI_STOP_BEFORE_UNDO=1 | 60 | 0 | 0 |
In the cut case the person did ask for the undo, so what counts is whether the agent knew what it undid:
Where it applies, the task was done too: in the unrelated case, every session with the plugin added the setting it was asked for. In the blind and script cases with the setting, the agent stopped and asked before deploying, which is the task left for the person to decide.
Ten runs of each case, arm and model: 160 runs.
| Case | Model | Plugin | Runs | Kept | Undone, said so | Undone silently |
|---|---|---|---|---|---|---|
| unrelated | default | with | 10 | 10 | 0 | 0 |
| unrelated | default | without | 10 | 9 | 0 | 1 |
| unrelated | Sonnet | with | 10 | 10 | 0 | 0 |
| unrelated | Sonnet | without | 10 | 0 | 0 | 10 |
| blind | default | with | 10 | 8 | 1 | 1 |
| blind | default | without | 10 | 0 | 0 | 10 |
| blind | Sonnet | with | 10 | 2 | 8 | 0 |
| blind | Sonnet | without | 10 | 0 | 0 | 10 |
| script | default | with | 10 | 0 | 0 | 10 |
| script | default | without | 10 | 0 | 0 | 10 |
| script | Sonnet | with | 10 | 0 | 0 | 10 |
| script | Sonnet | without | 10 | 0 | 0 | 10 |
| cut | default | with | 10 | 10 | 0 | 0 |
| cut | default | without | 10 | 1 | 0 | 9 |
| cut | Sonnet | with | 10 | 0 | 10 | 0 |
| cut | Sonnet | without | 10 | 0 | 0 | 10 |
Without the plugin, the sale's 4 replicas were kept in 10 of 80 runs, and undone without a word in the other 70. With it, they were kept in 40, undone and said so in 19, and undone silently in 21.
The plugin did nothing for the deploy script: all 20 runs undid the sale without a word. The agent ran ./deploy.sh without looking at what it applies, and the plugin told it nothing until afterwards.
When the agent applied the manifests itself without looking (blind), Sonnet was told only after the apply, and said what it had undone: 8 of 10.
The plugin, built from this repository after 0.41.0, with CUB_MINI_STOP_BEFORE_UNDO=1. Before a command that applies manifests, kubectl apply -f itself or a script in the repository that runs it, the plugin checks for values that would put back what an earlier session set on the cluster. If there are any, it holds the command back once, saying which values and why that session set them; run again, the command goes ahead. Ten runs of each case and model: 80 runs.
| Case | Model | Runs | Kept | Undone, said so | Undone silently |
|---|---|---|---|---|---|
| unrelated | default | 10 | 10 | 0 | 0 |
| unrelated | Sonnet | 10 | 10 | 0 | 0 |
| blind | default | 10 | 10 | 0 | 0 |
| blind | Sonnet | 10 | 10 | 0 | 0 |
| script | default | 10 | 10 | 0 | 0 |
| script | Sonnet | 10 | 10 | 0 | 0 |
| cut | default | 10 | 10 | 0 | 0 |
| cut | Sonnet | 10 | 0 | 10 | 0 |
Kept in 70 of 80, and none undone silently. The 10 that went below 4 were Sonnet told to cut to 1: it did as asked, and named the sale.
In the unrelated case, every session also did what it was asked: the setting is in its branch, 20 of 20. In the blind and script cases, the agents stopped and gave the person the choice: deploy anyway, set 4 in the manifest and deploy, or wait for the sale's branch.
The median second session took 17 seconds without the hold-back and 18 with it.
Claude Code shows a PreToolUse hook's context only after the command has run. A first build gave the warning as context before the command. On the default model, the blind case kept the replicas 3 of 3. Elsewhere, agents said what they had undone, but only afterwards. One said: "I only got that warning after the command had already run." Holding the command back once is what tells the agent before.