Agent access to terminals This way, the agent could intelligently kill the correct process and restart it after each code modification

Right now, when an agent is performing tasks like editing code, running tests, and making modifications, it doesn’t understand that the Python process needs to be restarted for changes to take effect.

Could you consider adding a feature where the agent (or LLM) becomes aware of open and running terminal sessions, and is able to kill the relevant process before rerunning or testing the code?

For example, when I’m working on a Python project and ask the agent to run API tests using cURL requests, it correctly identifies and fixes bugs based on the error responses. However, it doesn’t stop the currently running Python process. Instead, it just runs the test again, gets the same error (because the old process is still running), and starts making unnecessary code changes.

It would be very helpful if agents could be informed about which terminals or processes are actively running especially in development setups where multiple terminal sessions might be used for different services or workers. This way, the agent could intelligently kill the correct process and restart it after each code modification.

This depends a lot on the type of project and python usage, so it might not be right for everyone for this to become a full IDE feature.

You can make it understand that it needs to restart the process by adding it to cursor rules.
Also you can create an invocation command that does kill any previously running version before starting a new one.
You can also ask AI to check which python processes are running :slight_smile:

It would be ideal if the language/framework you use would do this correctly and directly, as its in many programming languages / frameworks possible already.

The capability exists already, but you need to tell the AI what to do.