Skip to content

feat: add --add-dir flag for extra writable roots - #5335

Merged
tibo-openai merged 1 commit into
mainfrom
tibo/add-dir-flag
Oct 19, 2025
Merged

tibo-openai merged 1 commit into
mainfrom
tibo/add-dir-flag

Conversation

@tibo-openai

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

Copy link
Copy Markdown
Collaborator

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
Comment thread codex-rs/README.md
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
Copy Markdown
Contributor

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

Comment thread codex-rs/core/src/config.rs Resolved
@tibo-openai
tibo-openai merged commit 4f46360 into main Oct 19, 2025
@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

2 participants