Codex CLI --cd ignored when connecting to Codex app server

Hi,

I’m trying to use the Codex CLI with a running codex app-server, and I want to start sessions in different working directories depending on how I invoke the CLI.

However, it always seems to use the working directory where the app server was started, regardless of what I pass via the CLI.

I’m starting the app server like this:

codex app-server --listen ws://127.0.0.1:3000

Then I’ve tried:

  1. Running codex --remote ws://127.0.0.1:3000 from a different directory. Codex does not use the current working directory, but instead uses the app server’s directory.

  2. Running codex --remote ws://127.0.0.1:3000 --cd /some/path. Codex ignores the --cd value and still uses the app server’s directory.

I can’t find a way to run sessions in different directories without starting multiple app servers, one per directory.

Is this expected behavior? If so, is running multiple app server instances the intended way to handle this?

1 Like

Hi, and welcome back.

I can confirm this is reproducible, and there is already a matching GitHub issue for it. You can also add your report there to help raise visibility and hopefully get it fixed sooner.

1 Like

Thanks for your reply! I didn’t come across that in my search but I’ll add a note in the GitHub issue.

1 Like