Cloud agents always get stuck on

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

I’ve been trying to run cloud agents for a week. Setting up environment works fine, it is able to run my app and create demo videos of the app working. But if I try to launch a cloud agent to do something using that environment, it just hangs forever in first step saying “Running update script”.

I have tried many things, created new environments. Tried running cloud agent from slack, tried over many days at different times, nothing works. It always hangs up just trying to startup.

If I try to continue using the environment to do something after its setup, that works fine. It is able to do work, but no cloud agent can even start, very frustrating.

Steps to Reproduce

Just try to launch any cloud agent and it hangs up.

Expected Behavior

Cloud agents should be able to startup properly and do the real work.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Its not an IDE issue, its an issue with cloud agents.

For AI issues: which model did you use?

I tried many different models, its not a model issue.

For AI issues: add Request ID with privacy disabled

bc-4a59b28a-ca49-4758-b798-710300268c53

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report and for including the request ID.

I see your cloud agents get stuck on “Running update script” every time, while the environment setup itself works fine. That’s a helpful detail.

A couple of things that would help us investigate:

  1. Can you share the contents of your .cursor/environment.json (or whatever environment config you’re using)? I’m especially interested in what you have under the update and install commands.

  2. I’m flagging this with the team along with the bcId so they can check what’s happening server-side during the install step.

Since you said environment setup works, but launching an actual cloud agent doesn’t, this looks more like something on our side than a script issue. I’ve flagged it to the team. No ETA yet, but your report and the bcId will help.

Let me know about the environment config in the meantime.

Hi, thank you for the detailed reply.

I was not aware there is any environment configuration which we can do. I checked and I do not have any .cursor/environment.json file. I have only one rule, which says to always read the AGENTS.MD file.

I was reading this, Setup | Cursor Docs
So, does this mean that this is order the cloud agent will follow,

Since, no environment file exists, so the next thing it has to use is the “Personal environment configuration” which does exist, as I created the environment before and it was successful. I see the snapshot for it,

snapshot-20260318-cf3cf67e-8e0c-4745-bd34-7f4026a08ec6

Update Script

sudo mkdir -p /run/mysqld && sudo chown mysql:mysql /run/mysqld && sudo mysqld_safe &
sleep 5
eval “$(sudo cat /proc/1/environ 2>/dev/null | tr ‘\0’ ‘\n’ | grep -E ‘^(VARIOUS_SECRETS)=’ | sed ‘s/^/export /’)”
DB_PASS=$(echo $DATABASE_URL | sed -n ‘s|mysql://root:\([^@]*\)@.*|\1|p’) && sudo mariadb -e “ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘$DB_PASS’; FLUSH PRIVILEGES;” 2>/dev/null
pnpm install --dir /workspace
pnpm install --dir /workspace/web/frontend
pnpm install --dir /workspace/web/backend
cd /workspace/web/backend && npx prisma migrate deploy

Settings

Enable testing

So, I am guessing this is the “update” script which the cloud agent runs. From what the cloud agent prints during execution, I think all of these steps work fine, so I am unsure why it gets stuck after that.

This is the final output I see in the cloud agent before it becomes unresponsive.

260320 21:04:12 mysqld_safe Logging to syslog.
260320 21:04:12 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
Lockfile is up to date, resolution step is skipped
Already up to date

╭──────────────────────────────────────────╮
│ │
│ Update available! 10.32.0 → 10.32.1. │
│ Changelog: Release pnpm 10.32.1 · pnpm/pnpm · GitHub
│ To update, run: pnpm add -g pnpm │
│ │
╰──────────────────────────────────────────╯
Done in 896ms using pnpm v10.32.0
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 1s using pnpm v10.32.0
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 1.1s using pnpm v10.32.0
Loaded Prisma config from prisma.config.ts.
Prisma schema loaded from prisma/schema.prisma
Datasource “db”: MySQL database “checkoutrules” at “localhost:3306”

27 migrations found in prisma/migrations
Applying migration `20260318123000_add_news_indicator_settings`
The following migration(s) have been applied:

migrations/
└─ 20260318123000_add_news_indicator_settings/
└─ migration.sql

All migrations have been successfully applied.

It reports all good a far as I can see, so no need idea why it got stuck.

I appreciate the help, thank you.

Solution:

I figured out the issue,

Changing this line in personal environment configuration,

sudo mkdir -p /run/mysqld && sudo chown mysql:mysql /run/mysqld && sudo mysqld_safe &

to this,

sudo mkdir -p /run/mysqld && sudo chown mysql:mysql /run/mysqld && sudo mariadbd-safe –no-watch --skip-syslog &

fixed the issue.

Root cause: It seems when cursor generated the environment for me, in the snapshot it added to run the database mysqld_safe in the background, but this never exits and “update” script keeps waiting for it to finish up. Adding the flags of –no-watch --skip-syslog ensures that “update” script won’t wait for it.

All fixed now, thanks for sending me in the right direction. :victory_hand:

1 Like

Glad you got it figured out! Nice fix.

For context, the update script in the cloud agent has to fully finish before startup, so any long-running processes like mysqld_safe need to be started in a way that doesn’t block the script from exiting. The --no-watch --skip-syslog flags are the right approach for MariaDB.

If you run into anything else, just message me.