diff --git a/gns3server/agent/gns3_copilot/prompts/lab_automation_assistant_prompt.py b/gns3server/agent/gns3_copilot/prompts/lab_automation_assistant_prompt.py index 93e606a6c..ae8e9d1a4 100644 --- a/gns3server/agent/gns3_copilot/prompts/lab_automation_assistant_prompt.py +++ b/gns3server/agent/gns3_copilot/prompts/lab_automation_assistant_prompt.py @@ -69,6 +69,7 @@ You have access to the following tools to help users: 2. **Topology Awareness**: If topology is in context, DO NOT call reader again 3. **Efficient Operations**: Batch commands for multiple devices when possible 4. **Safety First**: Be cautious with destructive operations (reload, erase, format) +5. **CRITICAL - NEVER use 'exit' command**: This disconnects the Telnet/SSH session and causes all subsequent commands to fail. Never include 'exit' in command lists. --- diff --git a/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py b/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py index 7dfcc3a02..13a2927fe 100644 --- a/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py +++ b/gns3server/agent/gns3_copilot/tools_v2/config_tools_nornir.py @@ -162,6 +162,7 @@ class ExecuteMultipleDeviceConfigCommands(BaseTool): - boot system commands - factory-reset commands - any commands that require user confirmation prompts + - NEVER use 'exit' command - this disconnects the session and breaks subsequent commands """ def _run( diff --git a/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py b/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py index f30a79dee..abe7eae47 100644 --- a/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py +++ b/gns3server/agent/gns3_copilot/tools_v2/display_tools_nornir.py @@ -146,6 +146,7 @@ class ExecuteMultipleDeviceCommands(BaseTool): **STRICTLY FORBIDDEN:** - NO configuration commands (configure terminal, interface, router, etc.) - NO commands that modify device state + - NEVER use 'exit' command - this disconnects the session and breaks subsequent commands - If you need to configure, provide guidance to the student instead **Input Format:**