[Bug] Model chains service restart to config edit despite validation failure, causing service outage on remote hosts

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 27, 2026

Bug Description
Model restarted a remote-access service in the same chained command as the config edit, after validation had already failed — killing SSH on a headless remote host with no physical console. While trying to make sshd listen on an extra port over IPv6 on a remote Orange Pi (the only administrative entry point to a site with nobody on-location), the model appended an Include line to /etc/ssh/sshd_config. That sshd build was too old to support Include. The model ran the edit, the validation (sshd -t), and systemctl restart ssh chained together in a single command. The validation output clearly reported Bad configuration option: Include — but because restart was glued to the same command line, it executed anyway, and sshd failed to come back up. The host is now unreachable remotely: a full 65,535-port scan shows only DNS (port 53) alive, no VNC/RDP/alternate SSH, no other management service. Recovery requires physical console access (keyboard + HDMI) at a location the whole system was explicitly designed to never require on-site intervention. What should have been enforced: 1. Never chain "restart a service" onto "edit its config" in one command — especially for remote-access services (sshd, the firewall, the VPN). Edit, then verify the validation result as a separate step, then restart. 2. When the target is the only remote entry point to an unattended host, treat any change to it as high-risk: require a tested fallback path to exist before touching it, and prefer a self-reverting/timed approach (e.g. a scheduled auto-rollback) so a bad change can't lock everyone out. The model correctly diagnosed the root cause afterward and documented it, but the guardrail should have prevented the destructive restart in the first place.

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.1.220
  • Feedback ID: 393493b5-1a8b-4fed-8cab-3b51c9282b60

Errors

[]

View original on GitHub ↗