Skip to content

Conversation

@tibo-openai
Copy link
Collaborator

@tibo-openai tibo-openai commented Oct 19, 2025

Add a --add-dir CLI flag so sessions can use extra writable roots in addition to the ones specified in the config file. These are ephemerally added during the session only.

Fixes #3303
Fixes #2797

@tibo-openai tibo-openai changed the title Add --add-dir flag for extra writable roots feat: add --add-dir flag for extra writable roots Oct 19, 2025
@tibo-openai tibo-openai marked this pull request as ready for review October 19, 2025 02:22
@tibo-openai tibo-openai enabled auto-merge (squash) October 19, 2025 02:33
Need to work across multiple projects? Pass `--add-dir` one or more times to expose extra directories as writable roots for the current session while keeping the main working directory unchanged. For example:

```shell
codex --cd apps/frontend --add-dir ../backend --add-dir ../shared
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see we are supporting adding multiple directories. Let's add an example for that

@tibo-openai tibo-openai merged commit 4f46360 into main Oct 19, 2025
20 checks passed
@tibo-openai tibo-openai deleted the tibo/add-dir-flag branch October 19, 2025 05:13
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for /add-dir (let Codex see multiple projects, not just one folder) Ability to add working folders

3 participants