codex - 💡(How to fix) Fix Browser Use actions fail with "Codex auth token is unavailable" in API-key mode [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21118Fetched 2026-05-05 05:53:22
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.429.30905 (2345)

What subscription do you have?

Using Codex App with OpenAI API key / API-token authentication (proxied via LiteLLM)

What platform is your computer?

Darwin 25.4.0 arm64 arm

What issue are you seeing?

At work, our provided setup is a LiteLLM key which I'm using to access the Codex app.

From my perspective as the user, I asked Codex to use the Browser Use plugin to interact with the Codex in-app browser. The requested action was a normal browser-control task: inspect the current page and click/navigate using visible page UI.

Codex was able to detect that an in-app browser tab was open and read basic tab metadata, but Codex then reported that the actual Browser Use actions were blocked.

Codex specifically observed that the following worked:

  • setupAtlasRuntime({ backend: "iab" }) succeeded
  • agent.browser.nameSession(...) succeeded
  • agent.browser.tabs.list() succeeded
  • agent.browser.tabs.selected() succeeded
  • tab.url() returned the selected in-app browser URL
  • tab.title() returned the selected page title

Codex specifically observed that the following Browser Use actions failed:

  • tab.playwright.domSnapshot()
  • tab.cua.get_visible_screenshot()

The failure message was:

Codex auth token is unavailable

My understanding is that I am using Codex App with API key proxied via LiteLLM. This looks like Browser Use can attach to the in-app browser enough to read tab metadata, but deeper Browser Use actions require a Codex Desktop / ChatGPT auth token that is not available in API-token mode.

What steps can reproduce the bug?

  1. Open Codex App.
  2. Use Codex App authenticated via API key / API-token mode rather than a ChatGPT/Codex subscription session.
  3. Open the Codex in-app browser and navigate to any page.
  4. Ask Codex to perform a normal browser-control task using Browser Use, such as inspecting the current page or clicking a visible UI item.
  5. Codex initializes Browser Use with the iab backend.
  6. Codex can read selected-tab metadata such as URL and title.
  7. Codex attempts deeper Browser Use actions such as DOM inspection or screenshot capture.
  8. Those actions fail with:

Codex auth token is unavailable

Minimal repro from Codex’s Browser Use runtime:

const { setupAtlasRuntime } = await import("<browser-use plugin root>/scripts/browser-client.mjs"); await setupAtlasRuntime({ globals: globalThis, backend: "iab" });

await agent.browser.nameSession("Browser auth repro"); const tab = await agent.browser.tabs.selected();

console.log(await tab.url()); console.log(await tab.title());

await tab.playwright.domSnapshot(); // Fails: Codex auth token is unavailable

await tab.cua.get_visible_screenshot(); // Fails: Codex auth token is unavailable

What is the expected behavior?

I would have expected the full functionality of the Codex app available to me even though I'm not using the Codex subscription.

Additional information

No response

extent analysis

TL;DR

The issue is likely due to the lack of a Codex auth token when using the API key proxied via LiteLLM, which is required for deeper Browser Use actions.

Guidance

  • The error message "Codex auth token is unavailable" suggests that the Codex app requires a Codex Desktop / ChatGPT auth token for certain Browser Use actions, which is not available in API-token mode.
  • To verify this, try using the Codex app with a ChatGPT/Codex subscription session instead of API key / API-token mode and see if the Browser Use actions work as expected.
  • Consider using a different authentication method or contacting the Codex app support to see if there are any workarounds or alternative solutions.
  • Review the documentation for the Browser Use plugin to see if there are any specific requirements or limitations for using it with API key / API-token mode.

Example

// This code snippet is provided in the issue and demonstrates the failure
const { setupAtlasRuntime } = await import("<browser-use plugin root>/scripts/browser-client.mjs");
await setupAtlasRuntime({ globals: globalThis, backend: "iab" });

await agent.browser.nameSession("Browser auth repro");
const tab = await agent.browser.tabs.selected();

console.log(await tab.url());
console.log(await tab.title());

await tab.playwright.domSnapshot();
// Fails: Codex auth token is unavailable

await tab.cua.get_visible_screenshot();
// Fails: Codex auth token is unavailable

Notes

The issue seems to be specific to the Codex app and its authentication mechanisms. Without more information about the Codex app's internal workings, it's difficult to provide a more detailed solution.

Recommendation

Apply workaround: Consider using a different authentication method, such as a ChatGPT/Codex subscription session, to access the full functionality of the Codex app.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Browser Use actions fail with "Codex auth token is unavailable" in API-key mode [1 comments, 2 participants]