2.2 KiB
2.2 KiB
Until-success 5sim phone runner with cumulative accounting (2026-05-11)
Context: BOSS asked to continue OpenAI/Codex phone verification until it succeeds and then report the final number of phone numbers used.
Reusable pattern:
- Use a long-running script instead of repeated 20-number chunks.
- Carry forward
START_USED_NUMBERSfrom previous real activations. In the observed session the start was57(17Vietnam-specific +40free-country activations). - Count only successful 5sim activation purchases toward number usage.
no free phones, country-gate failures, CDP recovery failures, and page recovery failures do not count. - Continue emitting JSONL with both
new_numbersandtotal_numbersso the final report is unambiguous. - Keep a safety cap (
MAX_NEW_NUMBERS, default 300) unless BOSS explicitly approves unlimited spend.MAX_NEW_NUMBERS=0means unlimited. - Persist state to
/tmp/phone_verify_until_success_state.jsonwith current activation id, new count, total count, country, and success summary. - Keep
/tmp/current_fivesim_activation_id.txtupdated so an interrupted run can cancel the active order quickly. - Continue SMS-only behavior: immediate OpenAI rejection/invalid -> cancel; phone-verification with no 5sim SMS -> timeout cancel; SMS received -> submit code, finish activation, verify page leaves
phone-verification.
Suggested command:
START_USED_NUMBERS=<prior-real-activations> \
MAX_NEW_NUMBERS=300 \
CDP_PORT=9226 \
/Users/chick/homebrew/opt/python@3.11/bin/python3.11 \
/Users/chick/.hermes/skills/software-development/codex-oauth-plus-onboarding/scripts/phone_verify_until_success.py \
| tee /tmp/phone_verify_until_success.log
Key log phases:
until_success_start
activation_bought
phone_submitted
activation_cancel_rejected
sms_timeout_cancel
sms_received
sms_code_submitted
round_done_no_success
safety_max_reached_no_success
Final report should include:
prior real activations
new real activations
final total numbers used
success country + activation id if successful
5sim final state: FINISHED or CANCELED
OpenAI page state after code submission
Do not print full phone numbers, SMS code, API keys, proxy strings, OAuth callback code/state, or passwords.