Support multiple workspace folders in the Codex app
Problem
The Codex app currently allows selecting only one project folder per workspace.
My setup separates an AI workspace from a knowledge vault:
parent/
ai-workspace/ # deliverables, drafts, instruction files, AGENTS.md
obsidian-vault/ # interlinked Markdown notes used as persistent context
These folders are siblings and cannot be merged. The vault is a long-term knowledge base shared with other tools, while the workspace is a working area for current deliverables and agent-facing instruction files. With a single selected folder, Codex cannot read vault context while producing output in the workspace.
Current Workaround
Codex CLI supports --add-dir and sandbox_workspace_write.writable_roots, but the desktop app has no equivalent UI. Using the CLI for this defeats the purpose of the app for non-terminal workflows.
Requested Behavior
Allow adding multiple folders to a workspace in the Codex app, similar to “Add Folder to Workspace” in VS Code.
Each attached folder should appear as its own root in the UI, with per-folder permission profiles, for example:
- AI workspace: read-write
- Obsidian vault / knowledge vault: read-only by default, optionally writable when explicitly enabled
- Shared scripts or related repos: read-only or read-write depending on the task
AGENTS.md discovery should work per root, so each folder can carry its own local instructions and context conventions.
Use Case
An AGENTS.md in the workspace points to a context file describing the setup. Skills can read from and, when permitted, write to the vault for knowledge capture and recall. Deliverables, drafts, and generated artifacts are saved in the workspace.
This pattern works in comparable tools that support multiple folder mounts, and it is the main blocker to using the same setup in the Codex app.
Related
Related but narrower issue: #26338 tracks parent workspaces containing multiple Git repositories. This request is broader: multiple independent local folders, including non-Git knowledge/context folders, selected directly in the Codex app UI.
5 Comments
A concrete remote-operations use case that reinforces this request:
I use Codex Desktop on Windows as the primary UI for operating a remote Linux homelab. A single logical Codex project needs to group several related but independently versioned areas, for example:
The project is an operational workspace, not a monorepo. Individual threads specialize in media, AI, backups, networking, migrations, or a specific application, and a single task can legitimately span more than one child repository plus non-Git directories.
Today the Desktop app accepts only one root path. The available choices are both poor:
<parent>/.git, produces unnecessary prompts/failures, and may spend session time/tokens trying to force Git semantics onto a non-repository workspace.The CLI already has partial primitives such as
--add-dirandwritable_roots, but using the CLI defeats the Desktop app's better UI/UX for remote operation.The ideal Desktop behavior would be:
AGENTS.mddiscovery per root;This is a significant UX blocker for using Codex Desktop as an operational command center rather than only as a one-repository coding client. It also overlaps with #26338, but the need here is broader than multi-repo detection: the workspace must include both Git and non-Git directories without forcing the workspace root itself to become a repository.
A particularly useful Codex Desktop/worktree use case for this request is a primary writable repository with persistent read-only reference repositories.
Example:
A backend task could then implement an endpoint based on types and API usage already defined in the frontend, without being allowed to modify the frontend.
The current trade-off is awkward:
Suggested semantics:
.envto remain denied even inside an attached reference root.This would preserve worktree isolation for parallel tasks while still giving Codex the cross-repository context needed for frontend/backend contracts, shared libraries, schemas, and related services.
+1
This would be a huge unlock for real multi-repo / multi-folder workflows (e.g. frontend + backend + shared libs in one agent session).
Cursor’s Agents UI/UX is excellent for this: multi-workspace + multi-root workspaces make it natural to keep several project roots in one place, switch context, and let an agent work across folders without splitting everything into separate projects/threads. Something in that spirit for the Codex app would be fantastic.
Post-26.715 feedback from a frontend + backend multi-repository workflow:
The new multi-folder local project support is a strong start, but the current primary-folder semantics still leave an important correctness gap. The release notes say that new chats, Git operations, and automatic discovery of AGENTS.md, skills, and config.toml use the primary folder, while secondary folders are available for search, reading, and editing.
In my setup, one logical product contains two independent repositories:
A single task frequently changes both repositories. If Codex can edit the secondary backend repository but does not automatically discover and apply its AGENTS.md, it can perform valid filesystem edits while missing the repository-specific development and safety instructions. Requiring the primary AGENTS.md to manually point at every secondary AGENTS.md is fragile and makes project correctness depend on duplicated glue instructions.
I do not think eagerly concatenating every AGENTS.md into one global prompt is the best solution either. Instructions can conflict, and loading unrelated rules increases context usage. A root-aware model would be safer:
This would preserve a useful primary default without making secondary repositories second-class development targets. Cursor is a useful UX reference for switching workspace roots, but Codex also needs explicit per-root instruction scoping because AGENTS.md can contain build, test, security, and database requirements.
Is primary-only AGENTS.md discovery an intentional long-term design, or is per-root, path-scoped discovery planned for multi-folder projects?
So. the best solution then to make it all compatible with many usages described here that somehow deviated a little to different directions is to enable 'project' path/origin to be optionally 'project dir' or 'workspace dir'.
'Project dir' aims at current way of work (forced git project), treating it as a git project, while 'workspace dir' does not treat as git project but a group of folders that must work together to achieve an objetive, inside a sandbox.
Both methods should allow default structure configurations and mapping or custom mapping, allowing to load agents, skills, etc - from custom path mapped.
I think this way would work for everyone that proposed a solution on this issue while giving flexibilty for new ways of project configuration that we have not seen yet without adding too much complexyty to the UI/backend.