With the switch to cloud agent builds, after we updated our main environment to use them, recurring builds started happening every hour that always fail. However, if I kick off a manual build, it works perfectly fine.
Our environment is using a GitHub repository and is configured using an environment.json file with a Dockerfile for the build and separate install script. Unfortunately none of the recurring builds have any logs, so it’s unclear what is happening, though it seems like they’re failing almost immediately. All it says is that the “Build failed due to an unexpected error” with a status of “Terminal failure.” I’ve attached an image from a sample build with id bld-20260818-53150a2e-8094-4d35-93eb-614915c2229b. A successful manual build id is bld-20260817-e49edb1f-0f29-4ffd-82d6-42e7b84da4b7.
This isn’t causing us problems, as the manual build works and we can use the environment. But it seems like something is wrong with the recurring builds.
Steps to Reproduce
Every recurring build fails in the same way, so it is automatically reproducing itself.
Expected Behavior
The automated builds should succeed, same as the manual builds.
Thanks for the detailed report and both build IDs. I checked them and confirmed that the scheduled build is using your team’s GitHub connection, while the successful manual build uses your personal GitHub access.
The affected repository is currently associated with a personal GitHub App connection rather than the team connection. This causes scheduled builds to fail before a build container starts, which is also why no logs appear.
To resolve this:
Open Dashboard > Settings > Integrations > GitHub.
Ensure the affected repository is authorized through a team-level GitHub App connection.
If the existing installation belongs to another person’s personal connection, have the original installer transfer it to the Cursor team. If that option is unavailable, reinstall the GitHub App from a team admin context and authorize the repository.
Afterward, check the next scheduled build. A manual build will not confirm the change because it uses your personal GitHub access.
No changes to your Dockerfile or environment.json should be needed. We’re also tracking the unclear “unexpected error” message shown for this issue.
Thanks Kevin, that makes sense as to why the builds are failing.
I’ve confirmed that the Cursor Github App is installed on the organization with access to the repository. I also have it installed personally, as that seems necessary to actually use cloud agents in the UI, for example.
Cursor suggested that the issue was due to the Third-party application access policy being set to restricted, which it is, and Cursor does not show up on the list there. However I don’t seem to be able to grant it access, as it doesn’t show there and there is no option to grant it access from Sign in to GitHub · GitHub as it is not listed there. I imagine this is at least part of the issue, but it’s not clear how to go about fixing it.
I’ve tried removing and re-adding the GitHub integration from the Cursor settings, but that doesn’t seem to do anything. It shows up as GitHub account connected as <username> to repositories accessible in organizations: <org-name>.