[codex] Add global instructions contributor API - #26831
Closed
anp-oai wants to merge 1 commit into
Closed
Conversation
This was referenced Jun 6, 2026
anp-oai
force-pushed
the
codex/global-instructions-tests
branch
from
June 6, 2026 22:37
ea101e8 to
30038b0
Compare
anp-oai
force-pushed
the
codex/global-instructions-extension-api
branch
8 times, most recently
from
June 7, 2026 00:37
a8b37f8 to
6298c6f
Compare
anp-oai
force-pushed
the
codex/global-instructions-tests
branch
3 times, most recently
from
June 8, 2026 00:36
5f913ce to
31d0cff
Compare
anp-oai
force-pushed
the
codex/global-instructions-tests
branch
from
June 8, 2026 03:14
31d0cff to
6d65ba6
Compare
This was referenced Jun 8, 2026
anp-oai
force-pushed
the
codex/global-instructions-tests
branch
from
June 8, 2026 14:55
6d65ba6 to
1307637
Compare
anp-oai
force-pushed
the
codex/global-instructions-extension-api
branch
from
June 8, 2026 15:12
6298c6f to
177060c
Compare
anp-oai
commented
Jun 8, 2026
| #[derive(Clone, Debug, Default, PartialEq, Eq)] | ||
| pub struct GlobalInstructions { | ||
| pub instructions: Vec<GlobalInstruction>, | ||
| pub warnings: Vec<String>, |
Contributor
Author
There was a problem hiding this comment.
need to look at whether this is a pattern elsewhere in the contributor api, maybe we should have a typed error or similar here
anp-oai
force-pushed
the
codex/global-instructions-extension-api
branch
from
June 8, 2026 18:26
177060c to
7809eac
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Global instructions are currently embedded in
Config, which makes them difficult for hosts to supply through the extension system and couples the source of the instructions to core configuration loading. Embedders need a small explicit extension point before the loading and lifecycle behavior can move.What changed
GlobalInstructionsContributortrait.GlobalInstructionsandGlobalInstructionoutput types, including warnings and optional absolute source paths.ExtensionRegistryBuilder.codex-core-api.empty_extension_registry()genuinely empty; hosts must explicitly install a contributor.This PR only introduces primitives. Core does not resolve the contributor yet.
Stack
Test plan
just test -p codex-extension-api