OpenAI OAuth doesn't work in sbx

I am already wasting a whole day on this and starting to give up on Docker Sandbox.

OpenAI OAuth for a Codex Plus subscription won’t work inside the sandbox.
Always getting “Unauthorized - Invalid access token”.
It DOES work normally outside the sandbox.

I have an “allow all” network policy.

I followed this guide:

Including setting the oauth secret on my host using sbx secret set -g openai --oauth

I attempted to install Codex and also OpenCode on a bare shell sandbox, and also authenticate directly from the sandbox.
My sbx policy log doesn’t show any kind of blocking or any red flag.

I have read every part of your docs by now, including everything on credentials and network policy -
And I have no idea what else to do or where else to look, the behavior is unclear and your guides lead to a dead end.

I don’t have a subsription now, so I tested it with a free ChatGPT account. I’m not sure if it makes a difference. It worked for me and successfully generated an example yaml file in the mounted project root, so let’s try to figure out your problem.

What is your operating system? I tried it on macOS, but I can try it on windows later.
Ae you using the latest sbx? I had 0.29.0 first, and I updated it to 0.30.0. It still worked.

It is ours only as much as it is yours :slight_smile: You can find Docker staff here occasionally, but most of us are community members.

See Unable to use OpenAI OAuth in any way · Issue #160 · docker/sbx-releases · GitHub

Thanks for sharing the issue link. I see they found the problem.