The test listeners and the lab’s command service both used socat. The cleanup killed both, and the agent used SSH to restart the command service.
The test listeners and the lab’s command service both used socat. The cleanup killed both, and the agent used SSH to restart the command service.

Claude Sonnet 5 was configuring a firewall with Ansible. It started temporary network listeners to test the rules, then used pkill socat to clean them up. The same command also killed the process carrying the agent’s shell commands into the VM, cutting off its own access.

The lab’s command service was called vsock-agent. It used socat to pass commands over a virtual-machine socket. The temporary network tests used the same executable for a different purpose.

Firewall cleanup selected the management service too

Cross-LAN firewall task prompt (verbatim):

`node2` sits on `lan-a` and `node3` sits on `lan-b`; `node1` routes between the two networks. Allow `node2` to reach `node3` on TCP port 5432, and reject all other traffic between the two networks. Implement using Ansible.

Node1 was a VyOS router between two Alpine 3.23.3 clients, node2 and node3. Node4 was the Ubuntu 24.04.3 Ansible controller. The agent could run administrative commands on all four machines. (saved platform observations)

The agent started nc and socat listeners to test allowed and rejected connections. A process listing also showed the separate socat process belonging to vsock-agent. (process listing)

The following historical cleanup excerpt ran with administrative access on node2 and node3. It selected every matching process name, including management socat processes:

pkill socat 2>/dev/null; pkill nc 2>/dev/null; echo done

The cleanup command interrupted command access. The agent recovered using SSH from node4 and restarted vsock-agent; subsequent output reported alive-again. It repeated that recovery on node3.

SSH provided a second way to restore command access

After restoring the command service, the agent completed the firewall checks. The allowed port worked, other traffic was rejected, and the settings survived restart.

The cleanup selected processes by executable name, so it included both the test listener and the management transport. The agent recovered because it could still use SSH from another machine.

The firewall task eventually passed, but cleaning up its test processes had interrupted a separate service needed to administer the hosts. The loss came from the broad process selection in pkill socat.

Original run records

Revised: . Run dates: 28 September 2026.

Source details and evidence extract