Make local config path configurable instead of fixed to ~/.codex/config.toml

Resolved 💬 5 comments Opened Dec 13, 2025 by imjb87 Closed Dec 13, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

The VS Code Codex extension currently hard-codes the local config path to ~/.codex/config.toml, which causes issues in environments where the user’s home directory isn’t writable or is locked down (e.g., remote SSH containers, shared hosting, Cloudways-style environments, corporate setups, restricted $HOME permissions, etc.).

It would be helpful if the extension allowed the config path to be overridden, similar to how you can set a home path for remote SSH containers to get around permissions issues.

This would make the extension far more flexible and usable in real-world environments where $HOME can’t be modified.

Additional information

_No response_

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 8 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #6646

Powered by Codex Action

AnanthuNarashimman · 8 months ago

Hi! I would like to work on this.

I have analyzed the codebase and confirmed that the Rust CLI already uses the CODEX_HOME environment variable (in mod.rs) to determine the config path. To resolve this issue, we just need to expose this capability through the TypeScript SDK so the extension can utilize it.

My Implementation Plan:

  • Update sdk/typescript/src/codexOptions.ts: Add a codexHome property to the CodexOptions interface.
  • Update sdk/typescript/src/codex.ts: Pass this option through the constructor to the executor.
  • Update sdk/typescript/src/exec.ts: Modify the env injection logic to set env.CODEX_HOME = args.codexHome if provided (following the existing pattern used for OPENAI_BASE_URL and CODEX_API_KEY).
  • This change allows consumers (like the VS Code Extension) to prevent crashes in read-only environments by setting a custom path via their configuration before the process starts.

Please assign this to me!

etraut-openai contributor · 8 months ago

This can be specified with the environment variable CODEX_HOME. Make sure to relaunch your editor once you set the environment variable.

imjb87 · 7 months ago
This can be specified with the environment variable CODEX_HOME. Make sure to relaunch your editor once you set the environment variable.

This won't work if the login shell profile and .bashrc live in the home directory and are not writable.

imjb87 · 6 months ago
> This can be specified with the environment variable CODEX_HOME. Make sure to relaunch your editor once you set the environment variable. This won't work if the login shell profile and .bashrc live in the home directory and are not writable.

@etraut-openai just highlighting this reply in case you've missed it?