codex - 💡(How to fix) Fix Phone number formatting bug for +251 adds extra leading zero and prevents verification code delivery [3 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20351Fetched 2026-05-01 05:43:45
View on GitHub
Comments
3
Participants
4
Timeline
6
Reactions
0
Timeline (top)
commented ×3labeled ×3

Root Cause

This appears to be a formatting issue where a leading 0 is incorrectly added after the country code. Ethiopian phone numbers should not include the leading 0 when using the international format (+251). Because of this issue, users are unable to receive verification codes and cannot proceed with login.

RAW_BUFFERClick to expand / collapse

What issue are you seeing?

When attempting to log in to Codex, I am redirected to the "Add Phone Number" page. After entering my phone number with the country code +251 (Ethiopia), the system incorrectly modifies the number during the verification step.

Specifically, I enter my number in the format:

+251 9XXXXXXXX

But on the verification screen, it is displayed as:

+25109XXXXXXXX

This results in an invalid phone number format, and I do not receive the verification code.

What steps can reproduce the bug?

Log in to Codex. Get redirected to the "Add Phone Number" page. Select or confirm country code +251. Enter a valid Ethiopian mobile number starting with 9XXXXXXXX (without leading 0). Submit the phone number. Observe the number shown on the verification page.

What is the expected behavior?

The phone number should remain in the correct international format:

+251 9XXXXXXXX

It should not prepend an extra 0. The system should send the verification code to the correctly formatted number.

Additional information

This appears to be a formatting issue where a leading 0 is incorrectly added after the country code. Ethiopian phone numbers should not include the leading 0 when using the international format (+251). Because of this issue, users are unable to receive verification codes and cannot proceed with login.

extent analysis

TL;DR

The issue can be resolved by ensuring the phone number formatting logic correctly handles international numbers, specifically for the Ethiopian country code +251, without adding an extra leading 0.

Guidance

  • Review the phone number formatting logic to identify where the extra leading 0 is being added, focusing on the handling of the +251 country code.
  • Verify that the system correctly distinguishes between national and international number formats for Ethiopia, ensuring that international formats do not include a leading 0 after the country code.
  • Test the phone number submission process with various Ethiopian mobile numbers starting with 9XXXXXXXX to confirm the issue is consistently related to the formatting.
  • Consider implementing a special case or adjustment for the +251 country code to prevent the addition of the leading 0 in international format.

Example

No specific code example can be provided without knowing the exact implementation details, but the fix would involve modifying the phone number formatting function to correctly handle the +251 country code.

Notes

The solution depends on the specific implementation of the phone number formatting logic, which is not detailed in the issue. The fix must ensure that the system can correctly handle phone numbers for different countries, especially those like Ethiopia where the international format does not include a leading 0 after the country code.

Recommendation

Apply a workaround or fix to the phone number formatting logic to correctly handle the +251 country code, as upgrading to a fixed version is not mentioned as an option in the provided issue details. This is necessary to prevent the incorrect addition of a leading 0 and ensure users can receive verification codes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Phone number formatting bug for +251 adds extra leading zero and prevents verification code delivery [3 comments, 4 participants]