{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreifz2avxjl2ni4jt37kw5dmrhwhhv6sllwy7ziksf3vpt3ajyg6gyq",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mildmutn2aa2"
},
"path": "/t/codex-cli-cd-ignored-when-connecting-to-codex-app-server/1378429#post_1",
"publishedAt": "2026-04-03T07:57:17.000Z",
"site": "https://community.openai.com",
"textContent": "Hi,\n\nI’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.\n\nHowever, it always seems to use the working directory where the app server was started, regardless of what I pass via the CLI.\n\nI’m starting the app server like this:\n\n`codex app-server --listen ws://127.0.0.1:3000`\n\nThen I’ve tried:\n\n 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.\n\n 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.\n\n\n\n\nI can’t find a way to run sessions in different directories without starting multiple app servers, one per directory.\n\nIs this expected behavior? If so, is running multiple app server instances the intended way to handle this?",
"title": "Codex CLI --cd ignored when connecting to Codex app server"
}