This page explains how oc-codex-multi-auth handles local data, upstream requests, and debugging artifacts.
Last updated: 2026-07-18
This plugin prioritizes local control and transparency. It does not ship product telemetry or analytics to third parties. Network traffic is limited to the OpenAI/ChatGPT auth and API endpoints you are actively using, optional Codex instruction/catalog fetches from GitHub, and an optional daily npm version check when auto-update is enabled.
Caution
This plugin is for personal development use with your own ChatGPT Plus/Pro subscription. You are responsible for your prompts, exports, and OpenAI policy compliance.
No first-party telemetry. This plugin does not send usage analytics, crash reports, or account inventories to the package maintainers.
- No analytics product
- No usage tracking service
- No remote logging of prompts to maintainers
Local logs, caches, and config files on your machine are separate; see Data Storage.
All plugin state is stored locally on your machine unless you export it or opt into OS keychain storage.
| Item | Default path |
|---|---|
| Global account pool | ~/.opencode/oc-codex-multi-auth-accounts.json |
| Per-project account pool | ~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json |
| Flagged accounts | ~/.opencode/oc-codex-multi-auth-flagged-accounts.json |
Contents typically include OAuth access/refresh material, account IDs, labels/tags/notes, rate-limit reset metadata, and rotation state. Per-project pools are enabled by default (perProjectAccounts: true).
On startup the plugin may also read Codex CLI account material under ~/.codex (for example accounts.json) to help bootstrap the local pool. Disable with CODEX_AUTH_SYNC_CODEX_CLI=0. This is local filesystem access only; nothing is uploaded to the package maintainers.
Older installs may still have migration sources under ~/.opencode/ or a project tree:
| Legacy file | Role |
|---|---|
openai-codex-accounts.json |
Pre-rename account pool seed |
openai-codex-flagged-accounts.json |
Pre-rename flagged metadata |
openai-codex-blocked-accounts.json |
Older blocked-account list (migrated into flagged handling) |
<project>/.opencode/openai-codex-accounts.json |
In-repo legacy pool (read for migration; current pools live under ~/.opencode/projects/…) |
Current canonical names use the oc-codex-multi-auth-*.json prefix. Do not hand-edit legacy files unless you are recovering an old backup.
| Item | Default path |
|---|---|
| Plugin config | ~/.opencode/openai-codex-auth-config.json |
Includes runtime options such as retry profile, rotation strategy, model account pools, TUI preferences, and beginner-safe mode.
| Item | Default path |
|---|---|
| OpenCode config | ~/.config/opencode/opencode.json |
| OpenCode TUI config | ~/.config/opencode/tui.json |
| OpenCode auth tokens | ~/.opencode/auth/openai.json |
When CODEX_KEYCHAIN=1 is set, account pools can be stored in the OS credential store (macOS Keychain, Windows Credential Manager, Linux libsecret) under service name oc-codex-multi-auth. JSON files may be renamed with a .migrated-to-keychain.<timestamp> suffix for rollback. Keychain failures fall back to JSON without silently deleting credentials.
| Item | Default path |
|---|---|
| TUI quota cache | $OPENCODE_STATE_DIR when set, otherwise OpenCode's state directory (typically ~/.local/state/opencode/), file oc-codex-multi-auth-tui-quota.json, with a ~/.opencode/ fallback in some builds |
Caches recent quota/usage snapshots for prompt status display.
When sessionRecovery is enabled (default), recoverable session repairs read/write OpenCode's on-disk message/part store:
| Item | Default path |
|---|---|
| OpenCode storage root | $XDG_DATA_HOME/opencode/storage (macOS/Linux default ~/.local/share/opencode/storage; Windows %APPDATA%/opencode/storage) |
| Messages | …/message/{sessionID}/… |
| Parts | …/part/{messageID}/*.json |
Only known structural recovery cases are patched (missing tool results, thinking-block order, thinking-disabled violations). Tokens are not written here.
| Item | Default path |
|---|---|
| Cache directory | ~/.opencode/cache/ |
May include Codex system instructions, catalog-derived instruction files, ETag/meta files, and the auto-update check cache (update-check-cache.json).
| Item | Default path |
|---|---|
| Request logs | ~/.opencode/logs/codex-plugin/ |
Written only when request logging is enabled (ENABLE_PLUGIN_REQUEST_LOGGING=1). Metadata logs omit raw bodies by default; set CODEX_PLUGIN_LOG_BODIES=1 only when you need raw request/response payloads (sensitive: may include prompts and model output).
Export/import and installer backups may create files under ~/.opencode/backups/ or project-scoped backup directories. Treat exports as credential-bearing data.
API and auth traffic go directly from your machine to OpenAI/ChatGPT endpoints over HTTPS. There is no maintainer proxy.
| Service | Endpoint |
|---|---|
| OAuth authorize / token | https://auth.openai.com/... (e.g. /oauth/authorize, /oauth/token) |
| Codex API | https://chatgpt.com/backend-api/codex/responses |
| Usage / quota window | https://chatgpt.com/backend-api/wham/usage |
Reset-credit listing (codex-reset) |
https://chatgpt.com/backend-api/wham/rate-limit-reset-credits |
Reset-credit redemption (codex-reset) |
https://chatgpt.com/backend-api/wham/rate-limit-reset-credits/consume |
The wham endpoints are the same undocumented endpoints the official Codex
clients use for the /usage screen and reset-credit redemption. They are
reached only from quota-facing surfaces — codex-limits, codex-reset, the
"Check quotas" action in the interactive auth dashboard, and the TUI quota
status refresh. The model request path does not call them.
When you use the plugin, a request can include:
- Your prompts and conversation history (as supplied by OpenCode)
- OAuth access token (for authentication)
- ChatGPT account/workspace identifiers used for routing
- Model selection, reasoning effort, verbosity, and related options
- Client identity headers:
originatorand a productUser-Agent(Codex CLI style or host/opencode style, depending on model and config). These are sent; they are not suppressed by default. - For GPT-5.6: responses-lite markers such as
x-openai-internal-codex-responses-lite
This is analogous to what official Codex-style clients send when talking to the same backend. Exact fields vary by model family and transform mode.
- No automatic upload of account lists, tokens, or logs to the plugin authors
- No remote analytics endpoint for this package
When autoUpdate is enabled (default true; disable with autoUpdate: false or CODEX_AUTH_AUTO_UPDATE=0), the plugin may query the public npm registry (registry.npmjs.org/oc-codex-multi-auth/latest) about once per day to detect a newer version, cache the result under ~/.opencode/cache/, and clear the OpenCode-managed plugin cache so a restart can pick up the update. That request does not send your ChatGPT tokens or prompts.
The plugin may fetch Codex instructions / model catalog material from GitHub (for example release metadata under openai/codex) with local caching and ETag reuse. Requests are ordinary HTTPS GETs without your ChatGPT credentials.
All auth and inference go through OpenAI/ChatGPT as listed above. See OpenAI Privacy Policy for how OpenAI handles data.
You have complete control over local data:
opencode auth logout
# Or manually:
rm ~/.opencode/auth/openai.jsonrm ~/.opencode/oc-codex-multi-auth-accounts.json
rm ~/.opencode/oc-codex-multi-auth-flagged-accounts.json
rm -rf ~/.opencode/projects/Also remove any project-scoped account files and keychain entries if you migrated with CODEX_KEYCHAIN=1 (see codex-keychain).
rm ~/.opencode/openai-codex-auth-config.json
rm -rf ~/.opencode/cache/
rm -rf ~/.opencode/logs/codex-plugin/
rm -f ~/.opencode/oc-codex-multi-auth-tui-quota.json- Visit ChatGPT Settings → Authorized Apps
- Find the app entry used for login (OpenCode / Codex-related)
- Click Revoke
This invalidates access tokens for that authorization.
- Tokens stay local except when sent to OpenAI/ChatGPT for authentication and API calls
- Auth and account files should remain user-readable only where the OS allows
- Diagnostic tools redact tokens and sensitive identifiers by default
- Expired tokens are refreshed automatically; refresh is queued to avoid races
The plugin uses PKCE for the browser OAuth flow (same class of flow used by official Codex CLI login).
OAuth, token refresh, and API requests use HTTPS.
Account emails can appear in screenshots or shared TUI sessions. To reduce exposure:
- Set a non-identifying label with
codex-label(labels are preferred over emails) - Enable
maskEmailin~/.opencode/openai-codex-auth-config.json(orCODEX_TUI_MASK_EMAIL=1) so remaining emails render as forms likeus***@example.com - Raw emails appear in
--includeSensitive/includeSensitiveJSON output only when you opt in
When using this plugin, you are subject to:
Your responsibility: ensure usage complies with OpenAI's policies and your subscription terms.
This plugin:
- Does not operate a maintainer-side personal data processing service
- Stores operational state locally under your control
- Provides deletion steps for local files and OAuth revocation
Data sent to OpenAI remains subject to OpenAI's practices.
Source: https://github.com/ndycode/oc-codex-multi-auth
You can review request shaping, storage, and logging behavior in the repository.
No Hidden Telemetry Product
There is no separate analytics backend for this package. Documented network calls are OAuth/API, optional GitHub catalog fetches, and optional npm version checks.
- Plugin-specific: GitHub Issues
- OpenAI data handling: OpenAI Support
- Security concerns: SECURITY.md
Back to: Documentation Home | Getting Started | Tools and CLI