Skip to content

fix: NX-15814 target ~/.codex/AGENTS.md (Codex ignores CODEX.md)#89

Merged
Hinne1 merged 1 commit into
mainfrom
feature/NX-15814-codex-agents-md
Jun 25, 2026
Merged

fix: NX-15814 target ~/.codex/AGENTS.md (Codex ignores CODEX.md)#89
Hinne1 merged 1 commit into
mainfrom
feature/NX-15814-codex-agents-md

Conversation

@Hinne1

@Hinne1 Hinne1 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Retarget the OpenAI Codex CLI config from ~/.codex/CODEX.md to ~/.codex/AGENTS.md (tool table GLOBAL_LLM_TOOLS, the SUPPORTED_TOOLS display string, and the README). Bump to 1.8.0.

Why

Codex instruction discovery is AGENTS.override.mdAGENTS.mdproject_doc_fallback_filenames; per the docs, "filenames not on this list are ignored", and ~/.codex/config.toml carries no instructions_file pointer. So the generic CLI routing block written to ~/.codex/CODEX.md was never read by Codex. AGENTS.md is the file Codex actually auto-loads.

Sources: https://developers.openai.com/codex/guides/agents-md , https://developers.openai.com/codex/config-reference

Migration / not a breaking change

~/.codex/CODEX.md is a generated file — llm-cli-setup writes a marker-delimited block into it and regenerates it every run; it is not user-authored config. Because Codex never read CODEX.md, moving the block to AGENTS.md loses no functional state. replaceOrAppendBlock updates only its own <!-- === CLI Tools === --> block, so any hand-added content in AGENTS.md is preserved.

The only residue is an orphaned, unread ~/.codex/CODEX.md. The consuming environment-setup change (NX-15814 PR, lands after this publishes) removes it via migrateStaleCodexMd, which deletes CODEX.md only when it contains nothing but our managed blocks and otherwise leaves it in place with a warning. That cleanup lives in env-setup because it is the layer that knows both marker pairs (generic + NegSoft); the library alone cannot safely determine "fully ours".

Verification

  • grep CODEX.md → no matches remain.
  • npm run lint + npm run check-format clean.
  • No test runner in this repo; smoke-asserted the tool table now resolves Codex → AGENTS.md.

Ref NX-15814.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Codex instruction discovery is AGENTS.override.md -> AGENTS.md ->
project_doc_fallback_filenames; filenames not on that list are ignored, and
the default home config has no instructions_file pointer. So the CLI routing
block written to ~/.codex/CODEX.md was never read by Codex. Retarget the Codex
entry in GLOBAL_LLM_TOOLS + the SUPPORTED_TOOLS display string + the README to
~/.codex/AGENTS.md, which Codex does auto-load.

Claude-Session: https://claude.ai/code/session_01DT7GQh2psBVq2MmGoteU5g
@Hinne1 Hinne1 force-pushed the feature/NX-15814-codex-agents-md branch from b8ddede to 7449b94 Compare June 25, 2026 06:35
@Hinne1 Hinne1 marked this pull request as ready for review June 25, 2026 06:54
@Hinne1 Hinne1 merged commit e25b64f into main Jun 25, 2026
7 checks passed
@Hinne1 Hinne1 deleted the feature/NX-15814-codex-agents-md branch June 25, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant