Skip to content

Conversation

@bn3t
Copy link
Contributor

@bn3t bn3t commented Sep 20, 2025

Summary

This PR is related to the Issue #3978 and contains a fix to the seatbelt profile for macOS that allows to run java/jdk tooling from the sandbox. I have found that the included change is the minimum change to make it run on my machine.

There is a unit test added by codex when making this fix. I wonder if it is useful since you need java installed on the target machine for it to be relevant. I can remove it it is better.

Fixes #3978

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@bn3t
Copy link
Contributor Author

bn3t commented Sep 20, 2025

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Sep 20, 2025
env.remove("JAVA_HOME");
env.remove(CODEX_SANDBOX_ENV_VAR);

let mut child = spawn_command_under_seatbelt(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think cargo clippy is asking you to drop the mut here

Suggested change
let mut child = spawn_command_under_seatbelt(
let child = spawn_command_under_seatbelt(

@nornagon-openai
Copy link
Collaborator

Overall looks good, just a minor lint issue.

@bn3t
Copy link
Contributor Author

bn3t commented Sep 26, 2025

I pushed a fix for the test. Please confirm you want to keep the test, btw.

@charlieforward9
Copy link

Looking for this to make it in soon! Nearly all of my codex responses contain:

  └ The operation couldn’t be completed. Unable to locate a Java Runtime.
    Please visit http://www.java.com for information on installing Java.

Copy link
Collaborator

@aibrahim-oai aibrahim-oai left a comment

Choose a reason for hiding this comment

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

Approving after syncing with @nornagon-openai

@aibrahim-oai aibrahim-oai merged commit ff6d4ce into openai:main Oct 30, 2025
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
@etraut-openai
Copy link
Collaborator

@bn3t, thanks for the contribution. I think this will make a lot of Codex users happy!

@bn3t bn3t deleted the Issue-3978 branch November 2, 2025 10:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot run java/jdk commands in macOS sandbox

5 participants