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:
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.
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?
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.