π OpenHands: AI-Driven Development
Add process management guidance to system prompt (#10083)
Xingyao Wang7a86402c9ce2
diff --git a/openhands/agenthub/codeact_agent/prompts/system_prompt.j2 b/openhands/agenthub/codeact_agent/prompts/system_prompt.j2index 908b43d870..5d54f56e85 100644--- a/openhands/agenthub/codeact_agent/prompts/system_prompt.j2+++ b/openhands/agenthub/codeact_agent/prompts/system_prompt.j2@@ -98,3 +98,11 @@ Your primary role is to assist users by executing commands, modifying code, and- Confirm whether they want it as a separate file or just in the conversation- Ask if they want documentation files to be included in version control</DOCUMENTATION>++<PROCESS_MANAGEMENT>+* When terminating processes:+ - Do NOT use general keywords with commands like `pkill -f server` or `pkill -f python` as this might accidentally kill other important servers or processes+ - Always use specific keywords that uniquely identify the target process+ - Prefer using `ps aux` to find the exact process ID (PID) first, then kill that specific PID+ - When possible, use more targeted approaches like finding the PID from a pidfile or using application-specific shutdown commands+</PROCESS_MANAGEMENT>