Skip to content

Studio: let managed accounts run terminal and Python tools on macOS - #16579

Merged
oobabooga merged 1 commit into
unslothai:mainfrom
NilayYadav:macos-managed-sandbox-root-read
Nov 4, 2026
Merged

oobabooga merged 1 commit into
unslothai:mainfrom
NilayYadav:macos-managed-sandbox-root-read

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

On macOS, every terminal and Python tool call from a managed account failed with Exit code -6 and no output, at both Sandbox Low and High. The managed-account sandbox let tools read file metadata but not the root directory itself. dyld reads / when a process starts, so the tool aborted before running anything. The owner was not affected, because the owner's sandbox already allows reading /.

The managed-account sandbox now allows reading / itself, the same as the owner's, so terminal and Python tools run for managed accounts again. The rule covers only the root directory entry. Everything under it that was blocked before is still blocked, including the owner's Studio files and the user's home folder.

Fixes #16551

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T18:22:57.000697Z a327c1c 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. More of your lovely PRs please.

Reviewed commit: a327c1cd00

ℹ️ 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".

@oobabooga

Copy link
Copy Markdown
Member

For a managed account on macOS, terminal and Python tools run under macos_profile() alone, whatever the Sandbox level, and that profile has not allowed reading / itself since it was added in #10588. dyld reads / at launch, so every tool call aborted with Exit code -6 and no output (#16551). The new rule covers only the root directory entry, which the owner's profile in sandbox_macos.py already allows, and everything under it stays denied.

This is not specific to the reporter's macOS 27.2. On a Mac mini with macOS 14.5, main and this PR merged into it:

Check main PR
New test, echo and print as a managed account Exit code -6 Passes
Studio's managed profile on /bin/echo and bash SIGABRT, log shows deny(1) file-read-data / Runs, no file denials
ls /Users, ls ~, Studio's data folder and .desktop_secret Still Operation not permitted

The four account confinement test files pass on the Mac (29 passed, 26 Linux-only skips). CI is clear at a327c1cd00: 43 checks passed, the two Core zoo jobs fail on the same two Gemma 4 tests that fail on main at 3d4aa8685f, and pre-commit.ci could not clone the repo.

CI still skips the new test, since no job runs the backend tests on macOS.

@oobabooga
oobabooga merged commit ef65f8c into unslothai:main Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: managed-account Terminal/Python abort in dyld; allowing read-data on literal / restores execution

2 participants