codex icon indicating copy to clipboard operation
codex copied to clipboard

Local project .codex directory support

Open moveforward01 opened this issue 4 months ago • 8 comments

What feature would you like to see?

add support for a .codex directory in the root of the project so you can have local project specific mcp settings and custom prompts/slash commands.

Are you interested in implementing this feature?

No response

Additional information

No response

moveforward01 avatar Sep 16 '25 05:09 moveforward01

Agreed, I would find project-specific prompts especially useful.

djliden avatar Sep 16 '25 20:09 djliden

This feature is critical to me and my workflow. Codex is entirely useless for me without it. Here is a little demo with the feature built in. If someone wants to improve on what I've done, then merge it in. https://github.com/Fomo-Driven-Development/claude-codex

dgnsrekt avatar Sep 19 '25 20:09 dgnsrekt

Coming from claude code I'm surprised this isn't implemented. While I found sub-agents nearly useless (despite trying hard to make them useful) I find project level custom slash commands pretty core to my workflows (i had 10+ i regularly used in claude code)

smaccoun avatar Sep 20 '25 03:09 smaccoun

Same. This is basically necessary for all nix projects that have non-trivial toolchains that must be available for the mcp.

o1lo01ol1o avatar Oct 03 '25 15:10 o1lo01ol1o

This is related to #2554.

etraut-openai avatar Nov 09 '25 19:11 etraut-openai

per-repo mcp servers and /prompts are used heavily in very large enterprise repos. Experience from GitHub copilot says I need this capability to keep hundreds of engineers working on a repo on the right work flow.

darrendukes avatar Nov 11 '25 17:11 darrendukes

It becomes hard to manage codex prompts, config, skills from a single global location. Please add local .codex folder support.

cogscides avatar Dec 11 '25 20:12 cogscides

I made a feature-request that was rightly closed to consolidate things. Sharing the details here to further the discussion: ... .codex/prompts/ Works exactly as currently supported. This is just a namespaced, repo-local location.

.codex/rules/ Equivalent to Cursor Rules, so file-based rules that are activated via glob patterns and are contextual and scoped. This lets Codex apply guidance where relevant, without polluting global context.

.codex/skills/ Instead of requiring one folder per skill, allow both files and folders. This keeps simple skills in a single file, while more complex ones can include specific data, files, or examples relevant to the skill.

.codex/skills/
  design-feature.md
  ci/
    README.md
    examples/
    skill.md

.codex/docs/ This is a lightweight alternative to docs-focused MCPs. There are two possible ways to support it: either a folder of relevant documentation files (e.g., the complete Convex rules file) or a single file that links to documentation pages and includes descriptions, hints, and usage context (like skills and prompts do right now).

Option 1 could go even further by including a description file (like Option 2), but using local files instead of web search. Both options would let Codex decide which docs to consult and load them selectively, based on descriptions or glob-based activation (similar to Cursor rules). This would simplify documentation grounding without needing external tools.

clearfram3 avatar Dec 13 '25 04:12 clearfram3

It would great if there was just one location for all these like the AGENTS.md standard:

  • Github it is .github/prompts/*.md
    • https://code.visualstudio.com/docs/copilot/customization/prompt-files
  • Claude code it is .claude/commands/*.md
    • https://code.claude.com/docs/en/slash-commands#project-commands
  • This suggestion would be .codex/**/*.md

I really wish a standard emerges that all these plugins supported like .prompts/**/*.md

aaronclong avatar Dec 17 '25 20:12 aaronclong