Skip to content

[codex] Add CODEX_HOME instructions contributor - #26832

Closed
anp-oai wants to merge 3 commits into
codex/global-instructions-extension-apifrom
codex/global-instructions-home
Closed

[codex] Add CODEX_HOME instructions contributor#26832
anp-oai wants to merge 3 commits into
codex/global-instructions-extension-apifrom
codex/global-instructions-home

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Why

CODEX_HOME instruction discovery is currently implemented inside codex-core, even though it is a host-level source of global instructions. Moving that behavior into a dedicated crate keeps core focused on rendering and lifecycle semantics and creates a natural home for future CODEX_HOME-specific behavior.

What changed

  • Adds the codex-home crate.
  • Adds CodexHomeInstructionsContributor, constructed from a CODEX_HOME path without depending on codex-core.
  • Preserves AGENTS.override.md precedence and fallback to AGENTS.md.
  • Preserves empty-file handling, lossy UTF-8 warnings, read failures, and absolute source reporting.
  • Allows global instructions to load without an execution environment.
  • Reexports the contributor from codex-core-api.

This PR defines the contributor but does not register or resolve it in production hosts yet.

Stack

  1. [codex] Characterize global instruction lifecycle #26830: lifecycle characterization tests
  2. [codex] Add global instructions contributor API #26831: extension API primitives
  3. [codex] Add CODEX_HOME instructions contributor #26832: CODEX_HOME contributor crate
  4. [codex] Persist structured instruction snapshots #26833: structured snapshot and history machinery
  5. [codex] Adopt global instructions contributors #26834: contributor adoption and compatibility removal

Test plan

  • just test -p codex-home
  • Coverage includes override precedence, fallback, whitespace-only and missing files, lossy UTF-8 warnings, source paths, read failures, and loading without an environment.
  • just bazel-lock-check

@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from 664b277 to 785bae7 Compare June 6, 2026 22:38
anp-oai added a commit that referenced this pull request Jun 6, 2026
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 7755e57 to c3df12e Compare June 6, 2026 22:42
@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from 785bae7 to 035d36c Compare June 6, 2026 23:41
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 38f08fd to 8c53e24 Compare June 6, 2026 23:43
@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from 035d36c to 9457850 Compare June 6, 2026 23:50
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 8c53e24 to 928c7ca Compare June 6, 2026 23:52
@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from 9457850 to c7dc495 Compare June 6, 2026 23:53
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 928c7ca to dbb73cc Compare June 6, 2026 23:55
@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from c7dc495 to c70089d Compare June 7, 2026 00:14
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 6357493 to 346915c Compare June 7, 2026 00:16
@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from c70089d to 246e1ac Compare June 7, 2026 00:21
anp-oai added a commit that referenced this pull request Jun 7, 2026
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 346915c to ff93380 Compare June 7, 2026 00:22
@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from 246e1ac to a8b37f8 Compare June 7, 2026 00:29
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from ff93380 to 5a5f942 Compare June 7, 2026 00:30
@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from a8b37f8 to 6298c6f Compare June 7, 2026 00:37
anp-oai added a commit that referenced this pull request Jun 7, 2026
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 5a5f942 to 1387a82 Compare June 7, 2026 00:38
Comment thread codex-rs/home/src/lib.rs
@@ -0,0 +1,76 @@
use std::io;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should have a doc comment

@anp-oai
anp-oai force-pushed the codex/global-instructions-extension-api branch from 177060c to 7809eac Compare June 8, 2026 18:26
@anp-oai
anp-oai force-pushed the codex/global-instructions-home branch from 161abd3 to 67bb15a Compare June 8, 2026 18:29
@anp-oai anp-oai closed this Jun 8, 2026
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