codex - 💡(How to fix) Fix Mobile apps: add Profile and daily usage/cost view backed by app-server APIs

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…

The new Codex mobile apps would benefit from a real Profile/Usage surface: auth state, account email, plan, rate-limit/credit status, and daily usage details. I could not find public Android/iOS/mobile app sources in openai/codex, so I opened a fork branch that adds the missing app-server support surface the mobile clients could consume.

Implementation branch: https://github.com/tzarebczan/codex/tree/codex/mobile-profile-usage Commit: https://github.com/tzarebczan/codex/commit/9bb3674e15

Root Cause

just argument-comment-lint was blocked on this Windows checkout because the recipe expects Bazel and expands the path incorrectly under this shell. The targeted prebuilt wrapper also requires dotslash; the source wrapper works for codex-app-server-protocol, but codex-app-server is blocked by the pinned Dylint nightly (nightly-2025-09-18, rustc 1.92) versus [email protected] requiring rustc 1.94.

Code Example

{ "method": "account/profile/read", "params": { "refreshToken": false, "includeRateLimits": true } }
RAW_BUFFERClick to expand / collapse

Summary

The new Codex mobile apps would benefit from a real Profile/Usage surface: auth state, account email, plan, rate-limit/credit status, and daily usage details. I could not find public Android/iOS/mobile app sources in openai/codex, so I opened a fork branch that adds the missing app-server support surface the mobile clients could consume.

Implementation branch: https://github.com/tzarebczan/codex/tree/codex/mobile-profile-usage Commit: https://github.com/tzarebczan/codex/commit/9bb3674e15

Public repo finding

The public openai/codex repo appears to expose the app-server/protocol pieces, but not the Android/iOS app implementations. I checked GitHub repo search for OpenAI-owned codex android, codex ios, and codex mobile, and those returned no public repos.

Existing app-server surface

The app-server already has useful building blocks:

  • account/read: returns the current account and whether OpenAI auth is required.
  • account/rateLimits/read: returns current ChatGPT rate-limit and credit snapshots.
  • thread/tokenUsage/updated: streams/restores per-thread usage with total/last input, cached input, output, and reasoning output token counts.

What it does not appear to expose today is a daily account-level usage ledger with per-day input/output/cached/reasoning tokens and cost.

Branch implementation

The branch adds a narrow v2 JSON-RPC method:

{ "method": "account/profile/read", "params": { "refreshToken": false, "includeRateLimits": true } }

Response shape:

  • account
  • requiresOpenaiAuth
  • authMode
  • optional rateLimits
  • optional rateLimitsByLimitId
  • optional rateLimitsError

The rate-limit fetch is optional so a profile/settings UI can render local account identity quickly, and still show account state if the backend rate-limit request fails.

Files touched in the branch:

  • codex-rs/app-server-protocol/src/protocol/v2/account.rs
  • codex-rs/app-server-protocol/src/protocol/common.rs
  • generated app-server protocol JSON/TypeScript schema fixtures
  • codex-rs/app-server/src/request_processors/account_processor.rs
  • codex-rs/app-server/src/message_processor.rs
  • codex-rs/app-server/README.md
  • app-server integration tests for the new endpoint

Validation run locally on Windows:

  • just write-app-server-schema
  • cargo test -p codex-app-server-protocol
  • cargo test -p codex-app-server --test all get_account_profile -- --nocapture
  • just fix -p codex-app-server-protocol
  • just fix -p codex-app-server

just argument-comment-lint was blocked on this Windows checkout because the recipe expects Bazel and expands the path incorrectly under this shell. The targeted prebuilt wrapper also requires dotslash; the source wrapper works for codex-app-server-protocol, but codex-app-server is blocked by the pinned Dylint nightly (nightly-2025-09-18, rustc 1.92) versus [email protected] requiring rustc 1.94.

Requested mobile feature

A Profile screen or account drawer on mobile could show:

  • signed-in account email and auth mode
  • plan type
  • current Codex rate-limit windows and reset times
  • current credits / usage-limit status where available
  • today / last 7 days / last 30 days token usage
  • input, cached input, output, and reasoning output token breakdowns
  • daily cost, if the backend can provide actual or pricing-derived cost

The daily token/cost view likely needs backend support beyond the current /api/codex/usage / /wham/usage snapshot that the public backend client maps to rate-limit data.

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 Mobile apps: add Profile and daily usage/cost view backed by app-server APIs