Skip to content

Rename agent identity login surface to access token#21059

Merged
shijie-oai merged 6 commits into
mainfrom
shijie/access-token-agent-identity-login
May 5, 2026
Merged

Rename agent identity login surface to access token#21059
shijie-oai merged 6 commits into
mainfrom
shijie/access-token-agent-identity-login

Conversation

@shijie-oai
Copy link
Copy Markdown
Collaborator

@shijie-oai shijie-oai commented May 4, 2026

Why

The external startup/login surface for this auth path should talk about an access token instead of exposing the internal Agent Identity terminology. Users should pass CODEX_ACCESS_TOKEN or pipe a token into codex login --with-access-token; the old external env/flag spellings are removed so there is only one supported user-facing path.

What Changed

  • Added CODEX_ACCESS_TOKEN as the supported environment variable for this auth path.
  • Added codex login --with-access-token as the supported stdin-based login command.
  • Removed the legacy CODEX_AGENT_IDENTITY env-var fallback and hidden --with-agent-identity CLI alias.
  • Updated CLI error, status, and stdin prompts to use access-token language.
  • Added coverage for access-token env loading, CLI login failure behavior, and renamed login status text.

Validation

  • cargo test -p codex-login
  • cargo test -p codex-cli
  • just fix -p codex-login
  • just fix -p codex-cli
@shijie-oai shijie-oai force-pushed the shijie/access-token-agent-identity-login branch from f7f73ce to c200771 Compare May 4, 2026 20:27
Comment thread codex-rs/cli/src/main.rs
with_api_key: bool,

#[arg(
long = "with-agent-identity",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

So we are doing a "hard delete" and not keeping this around for backward compatibility - this is still a WIP feature and we are finalizing the branding here so should not have any user affect. Do let me know if we prefer to keep it around though to make it not so "breaking". Same thing applies to CODEX_AGENT_IDENTITY env read/consumption.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

any external users already, or not possible?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not possible - we have a few alpha testers and we can inform them of this change.

@shijie-oai shijie-oai marked this pull request as ready for review May 4, 2026 22:23
@shijie-oai shijie-oai requested a review from a team May 4, 2026 22:23
Comment thread codex-rs/login/src/auth/manager.rs Outdated
Comment thread codex-rs/cli/src/login.rs Outdated
@shijie-oai shijie-oai merged commit 0d418f4 into main May 5, 2026
26 checks passed
@shijie-oai shijie-oai deleted the shijie/access-token-agent-identity-login branch May 5, 2026 02:43
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

3 participants