[codex] Load user instructions through an injected provider - #27101
Merged
Conversation
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 9, 2026 01:38
229d76f to
93fd86b
Compare
anp-oai
added a commit
that referenced
this pull request
Jun 9, 2026
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 9, 2026 01:45
79a26f1 to
a36d084
Compare
anp-oai
commented
Jun 9, 2026
anp-oai
commented
Jun 9, 2026
anp-oai
commented
Jun 9, 2026
anp-oai
commented
Jun 9, 2026
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 9, 2026 18:20
419a8f4 to
4024ec7
Compare
anp-oai
added a commit
that referenced
this pull request
Jun 9, 2026
anp-oai
added a commit
that referenced
this pull request
Jun 9, 2026
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 9, 2026 18:36
13364fd to
ba87e81
Compare
anp-oai
added a commit
that referenced
this pull request
Jun 9, 2026
anp-oai
added a commit
that referenced
this pull request
Jun 9, 2026
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 9, 2026 21:21
ba87e81 to
295bcb2
Compare
anp-oai
marked this pull request as ready for review
June 9, 2026 21:40
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 667e8e9a05
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
jif-oai
approved these changes
Jun 10, 2026
anp-oai
added a commit
that referenced
this pull request
Jun 10, 2026
anp-oai
added a commit
that referenced
this pull request
Jun 10, 2026
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 10, 2026 16:32
7394680 to
384770f
Compare
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 11, 2026 17:20
a1214a2 to
57dd9b8
Compare
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 11, 2026 18:16
57dd9b8 to
85c1dec
Compare
anp-oai
enabled auto-merge (squash)
June 11, 2026 18:20
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 11, 2026 18:44
85c1dec to
1097deb
Compare
anp-oai
force-pushed
the
codex/global-instructions-provider
branch
from
June 11, 2026 18:57
1097deb to
8aca78f
Compare
anp-oai
disabled auto-merge
June 11, 2026 19:18
anp-oai
enabled auto-merge (squash)
June 11, 2026 19:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We want to remove implicit use of
$CODEX_HOMEfromcodex-coreand make embedders responsible for supplying user-level instructions. This also ensures user instructions load when no primary environment is selected.What changed
Stacked on #27415, which makes
codex execsurface thread-scoped runtime warnings.UserInstructionsProvidertocodex-extension-api, with absolute source attribution and recoverable loading warnings.codex-homewith the filesystem-backed provider forAGENTS.override.mdandAGENTS.md, preserving precedence, fallback, trimming, lossy UTF-8 handling, and the existing uncapped global instruction size.Configand requireThreadManagercallers to inject a provider.AGENTS.md, then assemble the model-visible instructions with the existing ordering, source attribution, warning, and turn-context behavior.Validation
just test -p codex-home -p codex-extension-apijust test -p codex-core agents_mdjust test -p codex-core guardianjust test -p codex-app-server thread_start_without_selected_environment_includes_only_global_instruction_sourcejust test -p codex-exec warningjust bazel-lock-check