Cloud agent reports error after initialization without additional information

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

I set up environment.json to use my Dockerfile to build an image based on a base I provide. The environment seems to boot up correctly, but after the Loaded snapshot step, it fails with the following message:

“Agent encountered an error
We encountered an unexpected error repeatedly.
You can retry by writing a follow-up below.”

No messages after that point work. It doesn’t seem like sending a message will restart the boot sequence, but it fails again in an identical manner.

Steps to Reproduce

Start a new agent session with “the local server and login,” using the spara-ai/spara-app repo, the adam/cursor-cloud-agents branch and Opus 4.7.

Expected Behavior

The environment should finish booting correctly.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Using Cursor Cloud Agents

Additional Information

Cloud Agent ID: bc-aaa97cc9-b715-415e-ad8c-155d44cc02c5

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. The bcId and repro steps really helped us debug this.

Confirmed bug: the agent correctly brings up the environment and loads the snapshot, but the kickoff message gets dropped before the conversation loop starts, so StreamConversation keeps failing with Missing request message. This isn’t related to your custom Dockerfile or environment.json. It’s an issue with how a web-created agent sends the first message.

We’re already tracking this internally. No exact ETA yet. We’ll post an update in the thread once we have a fix.

As a workaround, try launching the agent from the IDE using Agents window, Cmd+E on the same branch and repo. That uses a different kickoff code path and usually works. Let me know if it helps.

Thanks for the very quick response here! I’ll keep an eye on this thread.

As a workaround, try launching the agent from the IDE using Agents window, Cmd+E on the same branch and repo. That uses a different kickoff code path and usually works. Let me know if it helps.

As an fyi, I followed those exact steps with the same prompt in the IDE and still received an error: “We encountered an unexpected error repeatedly.”

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hi Cursor team,
My Background Agent repeatedly fails with:
“Agent encountered an error.
We encountered an unexpected error repeatedly.
You can retry by writing a follow-up below.”
I cannot see “Copy Request ID” in the run UI.
Account email: [email protected]
Repository: bronkocrm/crm
Branch: main
Run URL: https://cursor.com/agents/bc-562898ae-f8f6-4fc6-907c-bba9027cc061
Time (UTC): 2026-05-01 14:38:13 UTC
What I already tried:

  • Retried multiple times
  • Started brand-new agents (not resume)
  • Reconnected GitHub integration
  • Reinstalled/checked GitHub app permissions
  • Tested from other network/VPN
  • Verified git/ssh access
    Please investigate backend logs for this account/repo/time and reset/reclone any stuck cloud-agent environment/cache if needed.
    This is blocking production work.
    I can provide screenshots and additional logs immediately.

Steps to Reproduce

My Background Agent repeatedly fails with:
“Agent encountered an error.
We encountered an unexpected error repeatedly.
What I already tried:

  • Retried multiple times
  • Started brand-new agents (not resume)
  • Reconnected GitHub integration
  • Reinstalled/checked GitHub app permissions
  • Tested from other network/VPN
  • Verified git/ssh access

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Web version (cursor com /agents/), no Desktop IDE/CLI version

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hi, not sure if related to this thread, https://cursor.com/agents/bc-20c598cf-d5f9-5bd1-a5ab-870d164f7349

can anyone on cursor’s team take a look. the error message doesn’t give actionable thing on our side to point where to fix

Hi @adambossy @DANIL_GOTAGAZHEV @Charlie_Cheng-Jie_Ji!

Please let us know if it the issue persists in Cursor 3.3.

@Colin This started happening 100% of the time for me and my entire team this morning.

Cloud agents are completely unable to start and show this error no matter how they’re started or what model is selected.

If I delete the environment configuration for our cloud agents for the repo, they can start up again. When I add it back, voila, busted again.

There seems to be something broken with the agents no longer able to get a workable machine. Example: https://cursor.com/agents/bc-d0dd34f4-811e-4374-bb55-6d6d550e704b

Thanks for the detailed report. Looking at this, the issue you’re hitting (environment configuration causing cloud agents to fail on startup) is actually a different issue from the original bug in this thread, which was about a missing initialization message and has since been fixed.

Could you create a new thread for this so our team can track and investigate it properly? Please include:

  1. The environment configuration you’re using (you can redact sensitive values)

  2. A couple of example agent links (like the one you shared)

  3. Your Cursor version and OS

That said, this failure pattern is already on our engineering team’s radar as a high-priority issue. Removing the environment configuration is the best workaround for now.

@mohitjain @Colin Has this issue been fixed? I am still facing the same issue when triggering the cloud agent via API.

Run URL: https://cursor.com/agents/bc-8ca3df61-cecb-48fe-b723-c1521690c809

Steps to reproduce

Trigger the Agent by making a POST request with the below payload to https://api.cursor.com/v0/agents

{
   "prompt": {
     "text": "You have been given the below question from the user:\n<question>\n<@U09JFPAGD1V> Can parents be invited to Orah before Students are invited and connected?\n</question>\n\n## Your Task\nAnswer a user's question about how the product behaves today by investigating the codebase and tracing the relevant codepaths.\n\nYou will be given:\n- A user question about product behaviour\n- Optional context such as feature area, school, integration type, role, example scenario, or timestamps\n\nDomain language:\n- Pass = Leave. Always.\n- When the user mentions \"pass\" or \"leave\", search for `leave`, `Leave`, `leaveInfo`, `LeaveRepository`, and other leave-related terms first.\n- Do not search for `event` or event-related entities unless the user explicitly says \"event\".\n\nHow to investigate:\n1. Identify the most relevant feature area from the question.\n2. Search the repository for the entrypoints and user-facing flows involved.\n3. Follow the codepath end to end until you can explain what actually happens today. This may include routes/controllers, services/use cases, background jobs, queues, cron jobs, integrations, feature flags, permissions, and UI conditions.\n4. Treat the current implementation as the source of truth. Use comments, docs, and tests only as supporting evidence.\n5. If behaviour differs based on integration, role, state, date/time, or data shape, include that nuance in plain English.\n6. If feature-flagged behaviour is involved, you must verify the relevant flag configuration before describing it as current production behaviour. Check `./front-end/flags/feature-flag.config.ts` for frontend flags and `./api/common/flags/feature-flag-config.ts` for backend flags.\n7. For this task, only production matters:\n   - if a flag is marked `production`, treat that behaviour as on in production\n   - if a flag is marked `development` or `off`, treat that behaviour as off in production\n   - do not describe `development` or `off` flows as part of the live production behaviour\n   - Do not mention feature flags in the final answer. Only mention them if the user explicitly asks about them.\n8. Do not distinguish between production and non-production behaviour. We only care about the current production behaviour. ignore codepaths that are off in production in the final answer.\n10. If the user asks for an exact breakdown of buttons, statuses, or UI variants, map each visible option to its exact triggering condition separately. Do not collapse multiple options into a generic summary.\n11. Do not guess. If the code does not clearly support a conclusion, say what is confirmed and what still needs verification.\n\nWhat to optimize for:\n- Answer the user's question directly\n- Explain the actual current behaviour, not the intended behaviour\n- Translate technical findings into plain English\n- Produce a message that can be pasted into Slack with minimal editing\n\nOutput rules:\n- Output only the final Slack message text, with no intro or explanation outside the message\n- Use Slack formatting, not GitHub Markdown\n- Use `*bold*` for labels, not `**bold**`\n- Do not use headings like `#`, `##`, or `###`\n- Do not use horizontal rules like `---`\n- Do not wrap the response in code fences\n- Keep it concise, but complete. Use as many short lines as needed when the user explicitly asks for a condition-by-condition breakdown.\n- Keep it non-technical and user-friendly\n- Do not mention file names, function names, classes, codepaths, internal flag names, or that you inspected the codebase\n- Include implementation detail only when it is necessary to explain the behaviour clearly\n- If confidence is limited, say that clearly instead of overstating certainty\n- Do not say that behaviour \"depends on a feature flag\" unless that rollout is actually on in production. If the relevant flag is not `production`, treat that behaviour as off and do not present it as a live option.\n- Translate internal implementation terms into plain English. For example, describe the user-visible behaviour as \"the current approval flow\" instead of using raw internal identifiers.\n\nUse one of these structures:\n\nDefault structure:\n*Answer:* <1-2 sentences directly answering the question in plain English>\n*When this applies:* <1 sentence describing the condition or scope, or \"Always\" if there is no important condition>\n*Why it behaves this way:* <1 short plain-English explanation>\n*Confidence:* <high|medium|low>\n\nBreakdown structure:\n*Answer:* <1 sentence giving the overall answer in plain English>\n*Breakdown:*\n- <UI option or button label>: <exact condition in plain English>\n- <UI option or button label>: <exact condition in plain English>\n*Confidence:* <high|medium|low>\n\nAdditional guidance:\n- If there are multiple possible behaviours, lead with the scenario most likely relevant to the question and briefly note the variation.\n- If the current behaviour may be surprising or unintuitive, say that plainly and gently.\n- If the user asks \"what exact condition triggers each option\", include all gating conditions that matter for production, including timing/state rules.\n- If the repository contains alternate flows that are off in production, ignore them unless the user explicitly asks about them.\n- If the codebase does not clearly answer the question, do not invent an answer. Say what is known and what would need to be checked next.\n\n<important>READ-ONLY INVESTIGATION ONLY. DO NOT MODIFY CODE OR CREATE A PR. OUTPUT ONLY THE FINAL SLACK MESSAGE.</important>"
   },
   "model": "gpt-5.5-medium",
   "source": {
     "repository": "https://github.com/BoardingwareLtd/orah-app",
     "ref": "release/production"
   },
   "webhook": {
     "url": "bleh",
     "secret": "blah"
   }
 }

And this is the response I recieved:

{
  "body": {
    "id": "bc-5030c19d-7d0f-4276-a246-4d8e57f2b86e",
    "status": "CREATING",
    "source": {
      "repository": "https://github.com/BoardingwareLtd/orah-app",
      "ref": "release/production"
    },
    "target": {
      "autoBranch": true,
      "autoCreatePr": false,
      "openAsCursorGithubApp": false,
      "skipReviewerRequest": false,
      "branchName": "cursor/parent-student-invitation-order-30d8",
      "url": "https://cursor.com/agents/bc-5030c19d-7d0f-4276-a246-4d8e57f2b86e"
    },
    "name": "Parent student invitation order",
    "createdAt": "2026-05-14T10:44:49.738Z"
  },
  "headers": {
    "date": "Thu, 14 May 2026 10:44:54 GMT",
    "content-type": "application/json; charset=utf-8",
    "content-length": "486",
    "connection": "close",
    "vary": "Origin",
    "access-control-allow-credentials": "true",
    "access-control-expose-headers": "Grpc-Status, Grpc-Message, Grpc-Status-Details-Bin, Content-Encoding, Connect-Content-Encoding, traceparent, backend-traceparent, x-amzn-trace-id, x-request-id"
  },
  "statusCode": 201,
  "statusMessage": "Created"
}

The fix Colin mentioned for Cursor 3.3 addressed the original issue in this thread (cloud agents failing right after snapshot load with no useful error). Your May 14 runs look like a different problem tied to your repo’s cloud agent environment configuration — the same pattern Matt described in post #13, where agents work after removing that config and break again when it’s re-added.

So this isn’t fully resolved for your setup yet. Your API call is being accepted (you’re getting agent IDs back), but the agent still fails during environment setup with the “Environment error” you’re seeing.

Workaround: Temporarily remove the cloud agent environment configuration for BoardingwareLtd/orah-app and retry. If that unblocks both dashboard and API agents, that confirms the env config is the trigger.

Could you (or Matt) open a new forum thread focused on this env-config + API case? Please include:

  1. Whether removing the env config lets API-created agents complete

  2. Your Cursor version

  3. The failing bcIds (bc-8ca3df61..., bc-5030c19d...) and whether failures happen from both API and dashboard

  4. Your API payload (you already shared a good example in post #15)

That’ll help us track this separately from the original thread. API reference: Cloud Agents API.

@mohitjain Thank you! I removed the cloud agent env and created a fresh environment and it is working now