Load agent identity from CODEX_AGENT_IDENTITY#18180
Open
efrazer-oai wants to merge 1 commit intoefrazer/codex/agent-identity-only-startupfrom
Open
Load agent identity from CODEX_AGENT_IDENTITY#18180efrazer-oai wants to merge 1 commit intoefrazer/codex/agent-identity-only-startupfrom
efrazer-oai wants to merge 1 commit intoefrazer/codex/agent-identity-only-startupfrom
Conversation
This was referenced Apr 16, 2026
ae82643 to
90f493c
Compare
f4651cb to
ab99a2c
Compare
90f493c to
4f088d5
Compare
ab99a2c to
3901696
Compare
4f088d5 to
3317707
Compare
3901696 to
25c98e9
Compare
3317707 to
3e92738
Compare
0ba8937 to
365f848
Compare
3e92738 to
4783c5f
Compare
365f848 to
dff3e19
Compare
e8cde66 to
ee7a12a
Compare
dff3e19 to
d6ac9d8
Compare
ee7a12a to
5512954
Compare
d6ac9d8 to
ae61659
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.
Stack
CODEX_AGENT_IDENTITYWhat changed
Auth loading can now read
CODEX_AGENT_IDENTITYwhen env auth is enabled.The env var contains the same agent identity JWT accepted by
auth.jsonin #18176.CodexAuth::from_agent_identity_jwt(...)turns that JWT into ephemeral tokenless ChatGPT auth with one stored agent identity record.CODEX_API_KEYstill wins if both env vars are set.Validation
cd codex-rs && just fmtcd codex-rs && cargo check -p codex-login -p codex-corecd codex-rs && cargo test -p codex-login agent_identitycd codex-rs && cargo test -p codex-login load_auth_reads_agent_identity_from_envcd codex-rs && cargo test -p codex-login enforce_login_restrictionscd codex-rs && just fix -p codex-login