Point Codex at another directory
interactive sessions
// what it does
-C/--cd sets the directory Codex treats as the workspace root without you having to cd there first. The writable area of the sandbox and AGENTS.md discovery are both anchored to this directory, so it decides what the agent can edit and which project instructions it reads.
// shell
$ codex -C ~/projects/api "review this service"$ codex exec -C packages/web "run the type checker"// gotcha
Workspace-write permissions and AGENTS.md resolve from the -C directory, not your shell's current directory — point it at the repo root, not a subfolder, when the agent needs to edit across the project.