Skip to content

Warn that Unity, Unreal and Godot MCP run outside Studio's sandbox - #19781

Open
NilayYadav wants to merge 6 commits into
unslothai:mainfrom
NilayYadav:clarify-mcp-sandbox-scope
Open

NilayYadav wants to merge 6 commits into
unslothai:mainfrom
NilayYadav:clarify-mcp-sandbox-scope

Conversation

@NilayYadav

@NilayYadav NilayYadav commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Show a warning in the Unity, Unreal Engine and Godot MCP setup, for new and existing connections. These apps run the model's code (C#, editor commands and Python, GDScript) inside the editor, outside Unsloth's sandbox, so Sandbox High does not apply to them and that code can reach files outside the project. Blender's setup already says "unsandboxed Python"; Figma is read-only and Roblox Studio runs Luau inside Roblox's own sandbox, so neither gets the warning.

Also clarify the sandbox scope of Run automatically, both in Settings and in the chat permission menu (which said "Never ask, but keep code in the sandbox"), and in the MCP guide.

Verified with the frontend test suite (17436 pass, 0 fail), TypeScript, and the strict locale parity check.

Related to #19769.

Before / after

Unreal Engine setup dialog: the warning sits above the consent box.

Unreal Engine MCP setup, before and after

Godot setup dialog.

Godot MCP setup, before and after

Unity setup dialog.

Unity MCP setup, before and after

Figma's dialog is unchanged (read-only server, no warning on either side).

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T15:19:46.479562Z 3760871 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: a8ef4d3fdf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen danielhanchen changed the title Warn that Godot MCP runs outside Studio’s sandbox Warn that Unity, Unreal and Godot MCP run outside Studio's sandbox Nov 27, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 0376391218

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ca9197ab1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

value: "off",
label: "Run automatically",
description: "Never ask, but keep code in the sandbox",
description: "Never ask. Python and Terminal stay sandboxed, MCP tools do not",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the permission summary within its tested length limit

The new description is 63 characters, but studio/frontend/tests/permission-mode-learn-more.test.ts:103–107 requires every permission-mode description to be at most 60 characters. The existing menu descriptions stay to one short line test reproducibly fails against this commit, whereas the previous description satisfies the assertion. Shorten the summary while preserving the MCP caveat, or explicitly revise the layout/test contract if longer descriptions are intended.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 3623610: shortened to 53 characters, keeping the MCP caveat.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 3623610f77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 27, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 27, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 27, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 3760871abc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen added a commit that referenced this pull request Nov 27, 2026
…olds host RAM (copies drifted since zoo #2909) (#19999)

## Problem


`tests/utils/test_dataset_num_proc.py::test_the_two_copies_have_not_drifted`
fails on every `Core` leg, for example on the #19837 and #19781 staging
runs on current main:

```
AssertionError: unsloth/dataset_num_proc.py and unsloth_zoo/dataset_num_proc.py have diverged; the zoo copy is the source of truth
```

unsloth-zoo #2909 taught `unsloth_zoo/dataset_num_proc.py` to keep
`Dataset.map` in-process while `offload_layers` holds model layers
page-locked in host RAM. Linux copies that memory into every forked
worker at fork time, and a 120 GB host tier with 6 workers stalled the
map at 0 rows. The change adds `_offload_reason()` and returns it from
`_workers_unusable_reason()`. The fallback copy in unsloth, which is
used when the installed zoo has no `dataset_num_proc`, did not get the
same change. The guard is right: the zoo copy is the source of truth.

## Fix

Port the same `_offload_reason()` into `unsloth/dataset_num_proc.py` and
return it from `_workers_unusable_reason()`, matching the zoo code
exactly. Like the zoo version, it reads
`unsloth_zoo.block_swap.offload_active` only if that module is already
loaded, so nothing new is imported.

## Verification

With unsloth-zoo main (`cf4eb46`) on the path:
- `tests/utils/test_dataset_num_proc.py`: 106 passed.
- Before, on main's copy: `test_the_two_copies_have_not_drifted` failed
(1 failed, 105 passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants