You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for /add-dir (let Codex see multiple projects, not just one folder) #3303
Right now Codex feels kinda nearsighted 👓 — it only looks at the folder where I launched it.
But in real life, projects aren’t that clean. I’ve got a frontend repo talking to a backend repo, plus a shared/ folder with types, plus an infra repo with scripts… you get the idea.
Today, my “workflow” is basically:
copy stuff manually across repos
or start another Codex session and lose context
or do symlink shenanigans that make me feel like a hacker from the 90s
Meanwhile, Claude Code already has this cute trick: --add-dir (at startup) and /add-dir (mid-session). You just point it at another repo, and boom, it can see it. Super handy when you’re juggling FE/BE or polyrepos.
I’d love Codex to get the same superpower:
codex --add-dir ../backend ../shared at launch
/add-dir ../infra while chatting
maybe even /remove-dir when you realize you went too far 🗑️
Are you interested in implementing this feature?
I don’t mind testing or writing up real-world examples, but I’ll leave the actual code to you folks.
Additional information
No response
Reacted by Beehive Innovations, j, Dmitrii Selivanov, krmmzs, bhack, Li Yuanheng, anonsyn, Jake Kohn, Prashant Kalkar, Moh Badjah and 69 more
Would love to see this - it's a very common scenario when using agents to help port from one language to another (or one framework to another etc. etc.). Right now, Codex is a bit hamstrung compared to CC for these scenarios.
Reacted by Jake Kohn, Adam Johns, Boris and Jiakai Gu
#5335 added support for --add-dir, but afaict there isn't a way to add a directory to an existing session (like /add-dir). Can this be re-opened to account for that? Or shoudl I create a new issue?
Reacted by Mehmet Beydogan, David Myers, connierobin, James Picken and Emile Vrijdags
Activity
bhack commentedon Sep 10, 2025
I think this also requires in the extension and add files/folders button in the chat with a file/folder picker.
stephent commentedon Sep 17, 2025
Would love to see this - it's a very common scenario when using agents to help port from one language to another (or one framework to another etc. etc.). Right now, Codex is a bit hamstrung compared to CC for these scenarios.
rajohns08 commentedon Sep 24, 2025
Looks like a duplicate of #2797
francescomugnai commentedon Sep 29, 2025
+1
TanXiang7o commentedon Oct 17, 2025
+1
feat: add --add-dir flag for extra writable roots (#5335)
rubemz commentedon Oct 20, 2025
+1 looking forward to see it in the next release
feat: add --add-dir flag for extra writable roots (openai#5335)
feat: add --add-dir flag for extra writable roots (openai#5335)
feat: add --add-dir flag for extra writable roots (openai#5335)
feat: add --add-dir flag for extra writable roots (openai#5335)
JonasJonny commentedon May 27, 2026
This is working too.
Via #13914 (comment)
alanhe421 commentedon Jul 14, 2026
For now, this is the only solution available. Still, looking forward to better support for slash commands.
tmccombs commentedon Jul 22, 2026
#5335 added support for
--add-dir, but afaict there isn't a way to add a directory to an existing session (like/add-dir). Can this be re-opened to account for that? Or shoudl I create a new issue?