codex - 💡(How to fix) Fix Windows: Browser Use external navigation fails with "failed to start codex app-server" when child process HOME is missing [2 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#20956Fetched 2026-05-05 05:55:35
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2closed ×1

Error Message

  • Result: normal browser error such as net::ERR_CONNECTION_REFUSED failed to start codex app-server: 系统找不到指定的路径。 (os error 3) await tab.goto('https://example.com'); // fails earlier with app-server startup error

Root Cause

On Windows, Browser Use / the in-app browser can fail to navigate to external websites because the helper process for codex app-server appears to start without a valid home-directory environment.

RAW_BUFFERClick to expand / collapse

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

26.429.3425.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

On Windows, Browser Use / the in-app browser can fail to navigate to external websites because the helper process for codex app-server appears to start without a valid home-directory environment.

Observed behavior:

  • Local URLs can reach the browser layer normally
    • Example: http://127.0.0.1:65535
    • Result: normal browser error such as net::ERR_CONNECTION_REFUSED
  • External URLs fail earlier, before normal navigation
    • Example: https://example.com
    • Result: failed to start codex app-server: 系统找不到指定的路径。 (os error 3)

I also observed that the Node REPL environment inside Codex reports homeDir: null at the time this happens.

This suggests the Windows app is launching the Browser Use / app-server helper without a complete user-home environment, even though the main app itself is running normally.

What steps can reproduce the bug?

  1. Launch the Codex App on Windows.
  2. Open a session that uses Browser Use / the in-app browser.
  3. In the Node REPL, initialize the iab backend and get a tab.
  4. Try to navigate to a local URL and then an external URL.

Repro snippet:

if (!globalThis.agent) {
  const { setupAtlasRuntime } = await import(
    'file:///C:/Users/<redacted>/.codex/plugins/cache/openai-bundled/browser-use/0.1.0-alpha1/scripts/browser-client.mjs'
  );
  await setupAtlasRuntime({ globals: globalThis, backend: 'iab' });
}

globalThis.tab = await agent.browser.tabs.selected() || await agent.browser.tabs.new();

await tab.goto('http://127.0.0.1:65535'); // reaches browser layer, usually ERR_CONNECTION_REFUSED
await tab.goto('https://example.com');    // fails earlier with app-server startup error


### What is the expected behavior?

_No response_

### Additional information

Possibly related to:
- #18248
- #16268
- #14364

extent analysis

TL;DR

The issue can be resolved by ensuring the codex app-server helper process is launched with a valid home-directory environment.

Guidance

  • Verify that the homeDir environment variable is set correctly in the Node REPL environment inside Codex.
  • Check the system's environment variables to ensure that the HOME or USERPROFILE variable is set and points to a valid directory.
  • Investigate the launch process of the codex app-server helper to determine why it is not inheriting the main app's environment.
  • Review the related issues (#18248, #16268, #14364) for potential clues or fixes.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue seems to be specific to the Windows platform and the codex app-server helper process. The root cause is likely related to the environment variables not being properly set or inherited.

Recommendation

Apply a workaround to set the homeDir environment variable explicitly before launching the codex app-server helper process, as the issue is likely related to the environment variables not being properly set.

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