codex - 💡(How to fix) Fix Centralize and Support High-Level Developer Instructions [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20249Fetched 2026-04-30 06:31:07
View on GitHub
Comments
2
Participants
2
Timeline
14
Reactions
0
Timeline (top)
labeled ×6unlabeled ×4commented ×2mentioned ×1

Root Cause

If an enhancement isn't approved or can't be processed soon, I'm requesting site documentation with a recommended approach to consistent Codex directives in every working environment. When the LLM does a web search for information, it comes back with ambiguities because the documentation itself isn't clear about these things. We should at least be able to ask ChatGPT or Codex about how to do this as an accepted best practice, so that we can do it all ourselves without the tooling supporting the features (yet).

RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

IDE Extension, CLI, Web

What feature would you like to see?

ChatGPT has Custom Instructions which apply to all Projects and GPT threads. Codex Web has https://chatgpt.com/codex/cloud/settings/general Custom Instructions which apply only to Web.

Consider support for this tiered hierarchy for Codex:

  • Account = ChatGPT Custom Instructions, might be Company directives for Business/Enterprise
  • User = Individual/Team member preferences = ChatGPT Custom Instructions for Plus
  • new Codex Developer = Development-specific directives for the developer regardless of Codex environment. This is currently only available for Codex Web
  • Current, already supported:
    • Environment-specific
      • Codex Web for Cloud VPS
      • System = CODEX_HOME/AGENTS.md ( ~/.codex/AGENTS.md ) (not supported in Web/Cloud)
    • Project/Workspace AGENTS.md
    • Sub-folder AGENTS.md

What's missing now is the Developer-level tier which is set for Codex Web but isn't applied in any other Codex context.

The assistant manifested by Codex can refer to System instructions and Developer instructions. Obviously OpenAI provides the System instructions, but it seems like Developer instructions don't exist, or they are another tier from OpenAI, or maybe Codex-specific instructions from OpenAI. This terminology is ambiguous and doesn't include the Codex Web tier. The tier I'm proposing is actually a consistent Developer tier across all Codex environments.

Testing

  • Note specifics from your ChatGPT Custom Instructions and from your Codex Web instructions.
  • Open a CLI session and ask about a specific directive from your ChatGPT instructions. The assistant is not aware of those instructions.
  • Ask about a specific directive from your Codex Web instructions. It doesn't know about those either.

So it seems we need to maintain yet a third copy of our user and developer-oriented preferences in order for for Codex to code, document, and converse consistently across environments.

Reasoning

Codex isn't using User Custom Instructions or Codex Web Custom Instructions. This means, if we are to keep development consistent, all non-Web projects need their own set of centralized instructions, to avoid having to maintain a copy of ~/.codex/AGENTS.md into every system and OS user account that uses Codex.

Partial Solution Available Now

A way to accomplish this now is to wget/curl a gist or other text file on system startup and replace the local ~/.codex/AGENTS.md.

This technique *should obsolete current Codex Web Custom Instructions - or leaves that field to be repurposed as the universal Codex/Developer Custom Instructions.

Unfortunately that technique doesn't work for Codex Web itself. The Environment Setup instructions can download a AGENTS.md file, and save it to CODEX_HOME/AGENTS.md, but after the repo is retrieved and task processing begins, that file is gone. I don't know how to inject new instructions into the Codex VPS and make them stick. Modifying the project root AGENTS.md file requires a start hook or a modification to every repo AGENTS.md file - and a change to that file will affect git staging or commits. It would be better to allow the injection of AGENTS.md than to have to work around the file deletion.

Documentation

If an enhancement isn't approved or can't be processed soon, I'm requesting site documentation with a recommended approach to consistent Codex directives in every working environment. When the LLM does a web search for information, it comes back with ambiguities because the documentation itself isn't clear about these things. We should at least be able to ask ChatGPT or Codex about how to do this as an accepted best practice, so that we can do it all ourselves without the tooling supporting the features (yet).

Using a pre-session hook might be another way to address this, we do have start/end hooks, but I don't think the documentation is clear about how to apply a hook across all Codex environments.

So if the answer is "we can already do that", please consider this as a request for clear documentation.

Additional information

If Codex Web didn't delete the CODEX_HOME/AGENTS.md file, I would be fine with using wget/curl to achieve consistency. If that's a bug I'll create a separate ticket, and a fix there would eliminate the perceived "need" for a set of global Codex directives.

But with Codex becoming such a high-profile platform, it seems like it's time for platform consistency anyway, so I'm hoping to see both items addressed, global Codex Developer directives, and the issue with Codex Web deleting a provided AGENTS.md file.

extent analysis

TL;DR

To achieve consistent Codex directives across environments, consider implementing a centralized instructions system, potentially by utilizing a pre-session hook or modifying the Environment Setup to persist the AGENTS.md file.

Guidance

  • Investigate using a pre-session hook to inject custom instructions into Codex environments, as this might provide a workaround for the current limitation.
  • Explore modifying the Environment Setup to prevent the deletion of the CODEX_HOME/AGENTS.md file, which could simplify the process of maintaining consistent directives.
  • Review the documentation for start/end hooks to determine if they can be applied across all Codex environments, potentially providing a solution.
  • Consider creating a separate ticket for the issue with Codex Web deleting the provided AGENTS.md file, as resolving this bug could eliminate the need for additional features.

Example

No code snippet is provided, as the issue focuses on feature requests and workarounds rather than specific code implementation.

Notes

The proposed solution relies on the assumption that a centralized instructions system is necessary for consistent Codex directives. However, the issue highlights the complexity of maintaining consistency across different environments and the potential need for clearer documentation.

Recommendation

Apply a workaround, such as utilizing a pre-session hook or modifying the Environment Setup, as this approach can provide a temporary solution while awaiting potential feature enhancements or bug fixes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Centralize and Support High-Level Developer Instructions [2 comments, 2 participants]