I’m trying to understand the expected behavior of the Cursor Cloud Agent start script as described in the documentation:
https://cursor.com/docs/cloud-agent#startup-commands
From my understanding, the start script should run when a new cloud agent is initialized.
However, in practice, I’m not seeing the script execute on new agent kickoffs the way I would expect. This makes me unsure whether:
-
The start script is guaranteed to run exactly once per new agent instance
-
It only runs under certain conditions
-
It may be skipped if the agent environment is reused or cached
Here is my current environment.json
{
"build": {
"dockerfile": "Dockerfile",
"context": "."
},
"terminals": [],
"install": ".cursor/scripts/install.sh",
"start": ".cursor/scripts/start.sh",
"user": "root",
"ports": [{
"name": "api",
"port": 5501
}],
"agentCanUpdateSnapshot": true
}
Can someone clarify:
-
Is the start script guaranteed to run once for every new cloud agent spin-up?
-
Under what conditions would it not run?
-
How can I reliably verify that it executed?
Any insight into the lifecycle behavior of cloud agents would be greatly appreciated.