# Cloud Agents multi-repo environments fail with environment\_public\_id is invalid (GitHub App set to all repositories)

**URL:** <https://forum.cursor.com/t/cloud-agents-multi-repo-environments-fail-with-environment-public-id-is-invalid-github-app-set-to-all-repositories/161644>\
**Category:** Bug Reports\
**Tags:** github, cloud-agents\
**Created:** [May 26, 2026, 4:55pm UTC](https://forum.cursor.com/t/cloud-agents-multi-repo-environments-fail-with-environment-public-id-is-invalid-github-app-set-to-all-repositories/161644 "2026-05-26T16:55:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewSalzer](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AndrewSalzer](https://forum.cursor.com/u/AndrewSalzer)\
**Post date:** [May 26, 2026, 4:55pm UTC](https://forum.cursor.com/t/cloud-agents-multi-repo-environments-fail-with-environment-public-id-is-invalid-github-app-set-to-all-repositories/161644/1 "2026-05-26T16:55:54Z")

</div>

Whenever I configure a **Cloud Agent environment with more than one repository** , setup or save fails. Single-repo environments work; adding a second repo (or creating a new environment with two repos selected at once) consistently breaks.

**Error message (exact text):**  
**`environment_public_id is invalid for the current user/team`**

(Sometimes shown when selecting repos in the environment UI; the failure happens **before** an agent VM fully starts — not during **`pnpm install`** or similar.)

**What I’m trying to do:**  
I maintain two related private repos in the same GitHub org and need the agent to see both in one workspace — for example a production app and a rebuild:

- **`Org/repo`** (v1)

- **`Org/repo`** (v2)

I use Cloud Agents to compare behavior and port parity between them. Multi-repo is documented as supported (**[Cloud Agent setup — multi-repo environments](https://cursor.com/docs/cloud-agent/setup)**), but I cannot get a stable two-repo environment.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [May 26, 2026, 4:56pm UTC](https://forum.cursor.com/t/cloud-agents-multi-repo-environments-fail-with-environment-public-id-is-invalid-github-app-set-to-all-repositories/161644/2 "2026-05-26T16:56:01Z")

</div>

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the **Bug Reports** category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

> **Bug Report Template - Click to expand**
>
> **Where does the bug appear (feature/product)?**
> 
> - Cursor IDE
> - Cursor CLI
> - Background Agent (GitHub, Slack, Web, Linear)
> - BugBot
> - Somewhere else…
> 
> * * *
> 
> **Describe the Bug**  
> A clear and concise description of what the bug is.
> 
> * * *
> 
> **Steps to Reproduce**  
> How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!
> 
> 1. …
> 2. …
> 3. …
> 
> * * *
> 
> **Expected Behavior**  
> What is meant to happen here that isn’t working correctly?
> 
> * * *
> 
> **Screenshots / Screen Recordings**  
> If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)
> 
> * * *
> 
> **Operating System**
> 
> - Windows 10/11
> - MacOS
> - Linux
> 
> * * *
> 
> **Version Information**
> 
> - For Cursor IDE: Menu → About Cursor → Copy
> - For Cursor CLI: Run `agent about` in your terminal
> 
> ```auto
> IDE:
> Version: 2.xx.x
> VSCode Version: 1.105.1
> Commit: ......
> 
> CLI:
> CLI Version 2026.01.17-d239e66
> 
> ```
> 
> * * *
> 
> **For AI issues: which model did you use?**  
> Model name (e.g., Sonnet 4, Tab…)
> 
> * * *
> 
> **For AI issues: add Request ID with privacy disabled**  
> Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1  
> For Background Agent issues, also post the ID: bc-…
> 
> * * *
> 
> **Additional Information**  
> Add any other context about the problem here.
> 
> * * *
> 
> **Does this stop you from using Cursor?**
> 
> - Yes - Cursor is unusable
> - Sometimes - I can sometimes use Cursor
> - No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

---

<div class="post-metadata">

**Author:** ![AndrewSalzer](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AndrewSalzer](https://forum.cursor.com/u/AndrewSalzer)\
**Post date:** [May 26, 2026, 5:00pm UTC](https://forum.cursor.com/t/cloud-agents-multi-repo-environments-fail-with-environment-public-id-is-invalid-github-app-set-to-all-repositories/161644/5 "2026-05-26T17:00:48Z")

</div>

I think I was able to fix this by creating a new Cloud environment with both repositories selected. Took me awhile to figure it out though. Still would appreciate a response.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 25, 2026, 4:56pm UTC](https://forum.cursor.com/t/cloud-agents-multi-repo-environments-fail-with-environment-public-id-is-invalid-github-app-set-to-all-repositories/161644/9 "2026-06-25T16:56:38Z")

</div>

Closed on June 25, 2026, 4:56pm UTC

This topic was automatically closed after 30 days. New replies are no longer allowed.
