Command reference ยท Codex CLI
/project
Chooses a project for new chats.
/project selects a project that new chats start with. The slash command reference describes it briefly as "Choose a project for new chats" โ the selected project provides context such as files, instructions, and connected sources that newly started chats access.
Crucial for context: the doc on projects and chats makes clear that the ChatGPT Projects view is a feature of the ChatGPT desktop app, and states literally that the Codex CLI treats the directory you start it in as the project and doesn't show the Projects view at all.
In the terminal CLI, the project is therefore determined solely by the starting directory (or --cd <directory> respectively -C). The IDE extension accordingly uses the opened folder as the local project.
โ WHEN TO USE IT?
Tie new chats to the same files
You're working on a redesign for an extended period and select the matching project so new chats automatically use its files and instructions.
Bundle multiple chats for the same effort
Use a shared project for a feature with multiple subtasks, instead of starting each chat in isolation.
โ WHEN NOT TO?
Expected in the terminal CLI
According to the doc, in the terminal CLI the starting directory already determines the project; the CLI doesn't show the ChatGPT Projects view at all.
Better: Start the terminal CLI in the desired directory, or set it explicitly with --cd <directory>.
The work is a one-off
According to the doc, a project isn't worth it for an isolated chat without recurring context needs.
Better: Start the chat without a project.
SOURCES
- Codex CLI docs: Slash Commands โ learn.chatgpt.com
MORE COMMANDS ยท Codex CLI