Skip to content

Add feature-gated agent identity flow#14951

Closed
adrian-openai wants to merge 1 commit intomainfrom
dev/adrian/codex/agent-identity
Closed

Add feature-gated agent identity flow#14951
adrian-openai wants to merge 1 commit intomainfrom
dev/adrian/codex/agent-identity

Conversation

@adrian-openai
Copy link

@adrian-openai adrian-openai commented Mar 17, 2026

Summary

  • add a feature-gated use_agent_identity flow for ChatGPT-authenticated sessions in codex-core
  • persist one agent identity per workspace/account, mint one plaintext task_id per thread on first user prompt, and attach that task to backend/model + connector gateway requests
  • add targeted coverage for identity persistence, per-thread task creation/reuse, response/websocket headers, connector gateway propagation, config schema, and dependency lockfiles

Details

This wires the new agent identity flow into shared core services without changing the app-server RPC surface. When features.use_agent_identity is enabled and ChatGPT auth is active, Codex will register or reuse a persistent agent identity, store the long-lived key material in codex-secrets, create a thread-scoped task on first user turn, and propagate the resulting task_id only to the Responses/Codex backend path and the apps connector gateway path.

Testing

  • cargo +1.93.1 test -p codex-core suite::agent_identity
  • cargo +1.93.1 test -p codex-core agent_task_header
  • just write-config-schema
  • just bazel-lock-update
  • just bazel-lock-check
  • just fix -p codex-core
  • just fmt

Notes

  • cargo +1.93.1 test -p codex-core still has unrelated baseline/environment-sensitive failures outside this change set (for example in seatbelt, git_info, js_repl, and unified_exec paths), so this PR keeps validation focused on the new agent identity flow.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@adrian-openai
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Mar 17, 2026
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Mar 20, 2026
@adrian-openai
Copy link
Author

Closing this standalone PR in favor of the stacked rollout that now starts at #15587. Reviewers should start with #15587 and then move through #15588, #15589, and #15590 in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants