Repository navigation
Codex Desktop: add API/CLI support for creating and registering projects #25385
Description
Feature request
Please add supported API/CLI functionality for creating and managing Codex Desktop projects from automation and from Codex itself.
Use case
I want Codex to be able to organize many conversations into projects based on natural-language instructions, for example:
- "Create projects from this list of names."
- "Create Codex projects for each folder under
~/Documents/Codex/Projects." - "Analyze my existing chats and move/organize them into projects by topic."
Today Codex can create folders and can see existing saved project IDs, but it cannot register new project/workspace roots unless they were added through the Desktop UI.
What I tried
- Created project folders under
~/Documents/Codex/Projects - Added custom macOS folder icons
- Tried adding paths manually to
.codex-global-state.jsonunderelectron-saved-workspace-rootsandproject-order - Codex Desktop later rewrote the state back to the UI-registered project list
- Tried
codex app "/path/to/project" - Tried creating a thread with the app tool using an unregistered folder as
projectId
The tool rejected the unregistered path:
Unknown projectId: /Users/me/Documents/Codex/Projects/Gadgets
Saved projectIds:
/Users/me/Documents/Codex/Projects/TestProject
Requested behavior
Please expose supported project/workspace management operations, such as:
codex project add "/path/to/project"
codex project remove "/path/to/project"
codex project listor:
codex app "/path/to/project" --save-projector equivalent app-server methods:
{ "method": "workspaceRoot.add", "params": { "path": "/path/to/project" } }
{ "method": "workspaceRoot.list" }
{ "method": "workspaceRoot.remove", "params": { "path": "/path/to/project" } }It would also be useful if Codex agents could call an official tool to:
- create a project from a name
- register an existing folder as a project
- create projects from a list
- create projects from folders
- organize existing chats into projects by meaning/topic
Why this matters
Projects are core to keeping Codex useful over time. If a user has many workflows, manually creating and opening every project through the UI is slow and hard to automate. A supported API would enable:
- import workflows from ChatGPT project lists
- bulk project setup
- Finder Shortcuts / Automator Quick Actions
- cleanup and organization assistants
- future chat migration / classification workflows
Environment
- Codex Desktop on macOS
- Codex app version: 26.527.31326
- Codex CLI version: 2.93.0 GitHub CLI installed separately for reporting
Activity
Sereja3578 commentedon May 31, 2026
Additional finding after testing a manual migration attempt:
I tried to move existing projectless threads into saved projects by updating local state fields and sqlite metadata:
.codex-global-state.json->projectless-thread-ids.codex-global-state.json->thread-workspace-root-hintsto saved project rootsstate_5.sqlite->threads.cwdto the saved project root pathsImmediately after editing, local sqlite/global-state looked correct. After restarting Codex Desktop, the app restored the old state:
projectless-thread-idsreturned to the original projectless thread listthread-workspace-root-hintsreturned to/Users/me/Documents/CodexSo the saved/projectless ownership model appears to be maintained by another internal source of truth or reconstructed by the running app, and local file edits are not a reliable workaround. This makes an official API/tool for moving existing threads into projects even more important.
A useful API would cover both directions:
or equivalent app-server / desktop tool operations.
devansh-jain-18 commentedon Jul 10, 2026
I hit the same gap in Codex Desktop on macOS while trying to continue an agent task in a newly cloned repository.
Current behavior:
This leaves an agent able to clone and inspect a repository, but unable to add that folder to the Desktop project list or create a project-scoped worker there without a manual UI step.
An official high-level tool such as add_project(path), backed by an app-server workspace-root add/list/remove API, would close the gap without requiring self-UI automation or edits to internal global-state files.
drock commentedon Jul 31, 2026
Adding the missing desktop UX case to this request: Codex Desktop currently has no discoverable Remove project action in the project menu, and the project documentation covers editing/pinning/archiving chats but not removing a local project.
Requested behavior:
I investigated the local files as a workaround.
~/.codex/config.tomlcontains per-path trust settings, but removing those does not appear to be project removal. The desktop registry is represented across several keys in~/.codex/.codex-global-state.json(includinglocal-projects,project-order,selected-project,thread-project-assignments, and workspace-root state). Editing only one key would risk stale associations, and the app may rewrite the file while running. That makes manual configuration editing an unsafe, unsupported substitute for a first-class removal operation.pengusto commentedon Aug 18, 2026
One concrete use case for this API is project identity automation. I want a Codex skill to register a folder, set its display name, and assign an icon and color from a consistent scheme. Today, users have to configure each project manually in the app.
The API could cover:
Changing the display name should not rename the backing directory.
Related visual mockup and icon request: #25448
kjgryboski commentedon Aug 28, 2026
Confirmed on Codex Desktop for macOS: this remains a concrete automation gap even though the underlying app-server protocol already exposes idempotent
project/create.Reproduction
project/createfor an existing absolute directory.Opening the directory once with
codex app <absolute-path>does register it in Desktop, but that launches/navigates UI and is not a safe agent-facing primitive.Narrow requested contract
Please expose an agent/tool API equivalent to:
with these semantics:
project/createpath;.agents/bootstrap files);This would let an agent safely route a task to an exact linked worktree without launching UI, guessing a project ID, or modifying the repository. Until such an API exists, the safe fallback is one explicit folder registration followed by exact root verification; otherwise automation should return a clean blocker.
NAEL592 commentedon Sep 15, 2026
Adding a current Windows desktop use case: I asked Codex to fully organize the workspace. The agent could list projects, move them between sidebar sections, and archive inactive chats, but its available app tools had no operation to create/register a project or remove a saved project entry.
Please expose first-class agent tools for both operations, backed by the same saved-project registry used by the desktop UI:
list_projects.This would let Codex complete user-authorized workspace organization through supported tools. Please document support for local, remote, and ChatGPT projects.
squizzeak commentedon Sep 16, 2026
I’d also like to see this capability, specifically from ChatGPT itself: the assistant should be able to take existing chats and file/move them into Projects on the user’s behalf, similar to how chats can be organized into sections. An official project-management action exposed to ChatGPT/Codex would make large chat histories much easier to organize.