Skip to content

refactor: add agent identity crate#18871

Open
efrazer-oai wants to merge 2 commits intomainfrom
dev/efrazer/agent-identity-lib
Open

refactor: add agent identity crate#18871
efrazer-oai wants to merge 2 commits intomainfrom
dev/efrazer/agent-identity-lib

Conversation

@efrazer-oai
Copy link
Copy Markdown
Contributor

@efrazer-oai efrazer-oai commented Apr 21, 2026

Summary

This PR adds codex-agent-identity as an isolated crate for Agent Identity business logic.

The crate owns:

  • AgentAssertion construction.
  • Agent task registration.
  • private-key assertion signing.
  • bounded blocking HTTP for task registration.

It does not wire AgentIdentity into auth.json, AuthManager, rollout state, or request callsites. That integration happens in later PRs.

Reference old stack: https://github.com/openai/codex/pull/17387/changes

Stack

  1. fix: fully revert agent identity runtime wiring #18757: full revert
  2. This PR: isolated Agent Identity crate
  3. feat: add explicit AgentIdentity auth mode #18785: explicit AgentIdentity auth mode and startup task allocation
  4. refactor: route Codex auth through AuthProvider #18811: migrate Codex backend auth callsites through AuthProvider
  5. feat: load AgentIdentity from JWT env #18904: accept AgentIdentity JWTs and load CODEX_AGENT_IDENTITY

Testing

Tests: targeted Rust checks, cargo-shear, Bazel lock check, and CI.

@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-crate branch from 517af31 to 3a0d4c3 Compare April 21, 2026 19:24
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-lib branch from efedf63 to e02b5c8 Compare April 21, 2026 19:24
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-crate branch from 3a0d4c3 to 81a4782 Compare April 21, 2026 20:57
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-lib branch from e02b5c8 to 570e766 Compare April 21, 2026 20:57
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-crate branch from 81a4782 to c787e22 Compare April 21, 2026 21:03
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-lib branch from 570e766 to 5f85536 Compare April 21, 2026 21:03
efrazer-oai added a commit that referenced this pull request Apr 21, 2026
## Summary

This PR fully reverts the previously merged Agent Identity runtime
integration from the old stack:
https://github.com/openai/codex/pull/17387/changes

It removes the Codex-side task lifecycle wiring, rollout/session
persistence, feature flag plumbing, lazy `auth.json` mutation,
background task auth paths, and request callsite changes introduced by
that stack.

This leaves the repo in a clean pre-AgentIdentity integration state so
the follow-up PRs can reintroduce the pieces in smaller reviewable
layers.

## Stack

1. This PR: full revert
2. #18871: move Agent Identity
business logic into a crate
3. #18785: add explicit
AgentIdentity auth mode and startup task allocation
4. #18811: migrate auth callsites
through AuthProvider

## Testing

Tests: targeted Rust checks, cargo-shear, Bazel lock check, and CI.
Base automatically changed from dev/efrazer/agent-identity-crate to main April 21, 2026 21:30
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-lib branch from 5f85536 to 52fc527 Compare April 21, 2026 21:36
@efrazer-oai efrazer-oai marked this pull request as ready for review April 21, 2026 21:56
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52fc527e79

ℹ️ 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".

Comment thread codex-rs/agent-identity/src/lib.rs Outdated
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-lib branch from 52fc527 to f68e579 Compare April 22, 2026 01:10
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/agent-identity-lib branch from f68e579 to d593930 Compare April 22, 2026 01:12
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.

2 participants