Skip to content

Conversation

@daniel-oai
Copy link
Contributor

@daniel-oai daniel-oai commented Jan 30, 2026

Summary:

Testing:

  • cargo build -p codex-cli --bin codex
  • cargo build -p codex-rmcp-client --bin test_stdio_server
  • cargo test -p codex-core
  • cargo test --all-features
  • Manual: ran target/debug/codex from ~ and confirmed the disabled-folder warning and trust prompt no longer appear.

@daniel-oai
Copy link
Contributor Author

@codex please review

@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Jan 30, 2026
let dot_codex_abs = AbsolutePathBuf::from_absolute_path(&dot_codex)?;
let dot_codex_normalized =
normalize_path(dot_codex_abs.as_path()).unwrap_or_else(|_| dot_codex_abs.to_path_buf());
if dot_codex_abs == codex_home_abs || dot_codex_normalized == codex_home_normalized {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason you need both here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The first is a cheap, reliable equality check. The second handles symlinked or differently-canonicalized paths (which can happen with worktrees, temp dirs, or custom $CODEX_HOME).

Copy link
Contributor

Choose a reason for hiding this comment

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

this feels unnecessary to me but also don't think it's actively harmful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah its an uncommon situation but certainly does happen

Copy link
Contributor

@gt-oai gt-oai left a comment

Choose a reason for hiding this comment

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

thanks!

let dot_codex_abs = AbsolutePathBuf::from_absolute_path(&dot_codex)?;
let dot_codex_normalized =
normalize_path(dot_codex_abs.as_path()).unwrap_or_else(|_| dot_codex_abs.to_path_buf());
if dot_codex_abs == codex_home_abs || dot_codex_normalized == codex_home_normalized {
Copy link
Contributor

Choose a reason for hiding this comment

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

this feels unnecessary to me but also don't think it's actively harmful

@daniel-oai daniel-oai merged commit dd6c1d3 into main Jan 30, 2026
33 checks passed
@daniel-oai daniel-oai deleted the daniel-oai/fix-9932-running-codex-in-home branch January 30, 2026 20:42
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants