Skip to content

Allow ChatGPT accounts without email#28991

Merged
efrazer-oai merged 5 commits into
mainfrom
dev/efrazer/optional-account-email
Jun 22, 2026
Merged

Allow ChatGPT accounts without email#28991
efrazer-oai merged 5 commits into
mainfrom
dev/efrazer/optional-account-email

Conversation

@efrazer-oai

@efrazer-oai efrazer-oai commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Codex required every ChatGPT account to have an email address. A service-account personal access token can return valid account metadata without one, so PAT login failed while decoding the metadata response.

This change makes email optional in the account metadata type that owns it and preserves that absence through authentication, provider account state, the app-server API, generated clients, and TUI bootstrap. Existing accounts with email addresses keep the same behavior.

Behavior-changing call sites

Call site Behavior after this change
login/src/auth/personal_access_token.rs PAT metadata accepts a missing or null email and retains None.
agent-identity/src/lib.rs Agent Identity JWT claims accept an omitted email.
login/src/auth/storage.rs and login/src/auth/agent_identity.rs Stored and managed Agent Identity records carry Option<String>. Deserialization maps the legacy empty-string sentinel to None.
login/src/auth/manager.rs get_account_email returns the stored option, and managed identity bootstrap no longer converts None to an empty string.
model-provider/src/provider.rs and protocol/src/account.rs A ChatGPT provider account requires a plan type but may carry no email.
app-server-protocol/src/protocol/v2/account.rs account/read keeps the email field on the wire and returns null when the account has no email. Generated TypeScript and JSON schemas describe a required, nullable field.
sdk/python/src/openai_codex/generated/v2_all.py The generated Python ChatgptAccount model accepts None for email.
tui/src/app_server_session.rs Email-less ChatGPT accounts bootstrap normally, keep external feedback routing, omit account-email telemetry, and display the plan in account status.

Design decisions

  • Missing email remains None at every layer. The code never uses an empty string as a substitute.
  • The app-server response includes "email": null instead of omitting the field. Clients retain a stable response shape.
  • Plan type remains required for provider account state. This change relaxes only the email assumption.

Testing

Tests: affected test targets compile, scoped Clippy and formatting pass, a focused TUI snapshot covers plan-only account status, real before/after PAT login smoke covers metadata without email, app-server smoke covers account/read with email: null, and a regression smoke covers an existing email-bearing PAT. Unit tests run in CI.

Evidence

Visual smoke evidence will be attached here.

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: bbd558c84f

ℹ️ 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/model-provider/src/provider.rs
Comment thread codex-rs/app-server-protocol/schema/json/v2/GetAccountResponse.json
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/optional-account-email branch from bbd558c to 63df695 Compare June 18, 2026 22:36
@efrazer-oai

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: 63df6959a2

ℹ️ 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/model-provider/src/provider.rs Outdated
Comment thread codex-rs/app-server-protocol/src/protocol/v2/account.rs
Comment thread codex-rs/tui/src/app_server_session.rs
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/optional-account-email branch from 63df695 to c155833 Compare June 18, 2026 22:52
@efrazer-oai

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: c155833394

ℹ️ 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/app-server-protocol/src/protocol/v2/account.rs
Comment thread codex-rs/login/src/auth/manager.rs
Comment thread codex-rs/app-server-protocol/schema/json/v2/GetAccountResponse.json
@efrazer-oai efrazer-oai force-pushed the dev/efrazer/optional-account-email branch from c155833 to 5b59565 Compare June 18, 2026 23:04
@efrazer-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 5b59565a0f

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

@efrazer-oai efrazer-oai force-pushed the dev/efrazer/optional-account-email branch from 5b59565 to 1d224e5 Compare June 18, 2026 23:12
@efrazer-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@efrazer-oai efrazer-oai force-pushed the dev/efrazer/optional-account-email branch from 1d224e5 to e881ccc Compare June 18, 2026 23:16
@efrazer-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@efrazer-oai efrazer-oai marked this pull request as ready for review June 18, 2026 23:20

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

Copy link
Copy Markdown
Contributor

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: e881cccdc4

ℹ️ 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/login/src/auth/storage.rs Outdated
@efrazer-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 58e72dd316

ℹ️ 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/login/src/auth/manager.rs
Comment thread codex-rs/tui/src/status/tests.rs Outdated

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: c34bc747d4

ℹ️ 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 sdk/python/src/openai_codex/generated/v2_all.py Outdated
Comment thread codex-rs/tui/Cargo.toml

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 7b0e70e60d

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

Copy link
Copy Markdown
Contributor Author

/merge

@efrazer-oai efrazer-oai force-pushed the dev/efrazer/optional-account-email branch from 7b0e70e to a8a24e9 Compare June 22, 2026 19:37

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: a8a24e9fc6

ℹ️ 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/tui/Cargo.toml
Comment thread codex-rs/tui/src/status/tests.rs

@efrazer-oai efrazer-oai left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed automated review feedback.

Comment thread codex-rs/app-server-protocol/src/protocol/v2/account.rs
Comment thread codex-rs/login/src/auth/storage.rs Outdated

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 687fc1f403

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

Copy link
Copy Markdown
Contributor Author

/merge

@efrazer-oai efrazer-oai force-pushed the dev/efrazer/optional-account-email branch from 687fc1f to 80542ca Compare June 22, 2026 20:06

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: 80542ca23b

ℹ️ 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/tui/Cargo.toml
@efrazer-oai efrazer-oai merged commit 5a67d89 into main Jun 22, 2026
31 checks passed
@efrazer-oai efrazer-oai deleted the dev/efrazer/optional-account-email branch June 22, 2026 20:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants