<@U090ER7JPHA> we should add stuff like this to ou...
# feedback
c
@nutritious-balloon-65098 we should add stuff like this to our system_prompt.j2: "if you want to kill a process with smth like pkill, do not use a general keyword like
pkill -f server
OR
pkill -f python
bc you might accidentally kill other servers/processed, instead please use a more specific keywords, or use
ps aux
to find the process ID first, then specifically kill that". you should figure out which section in system prompt we should put it to -- create new section if you didn't find anything relavant there
n
I'm on it! Xingyao Wang can track my progress here.
I've successfully added process management guidance to the OpenHands system prompt as requested. Here's a summary of the changes: 1. Added a new <PROCESS_MANAGEMENT> section to the CodeAct agent's system prompt with the following guidelines: ◦ Warning against using general keywords with commands like
pkill -f server
or
pkill -f python
◦ Recommending the use of specific keywords that uniquely identify target processes ◦ Suggesting using
ps aux
to find exact process IDs before terminating them ◦ Recommending more targeted approaches like using pidfiles or application-specific shutdown commands 2. As instructed, I did not modify the readonly agent's system prompt (I initially added similar guidance but then reverted those changes per your request). The changes have been committed to the repository with appropriate commit messages. This addition will help prevent accidental termination of important processes by guiding the agent to use more precise process management techniques.
I've successfully completed the requested task: ✅ Added process management guidance to the CodeAct agent's system prompt ✅ Created a new <PROCESS_MANAGEMENT> section with specific guidance on safely terminating processes ✅ Kept the changes focused only on the CodeAct agent (reverted changes to the readonly agent as requested) ✅ Created a new branch named
add-process-management-guidance
✅ Pushed the changes to GitHub ✅ Created a draft pull request (#10083) following the repository's PR template The PR includes guidance that warns against using general keywords with commands like
pkill -f server
or
pkill -f python
, and instead recommends: 1. Using specific keywords that uniquely identify the target process 2. Using
ps aux
to find the exact process ID first 3. Using more targeted approaches like finding PIDs from pidfiles or application-specific shutdown commands This addition will help prevent accidental termination of important processes when the agent is asked to kill a specific process.