Skip to content

Monthly usage limit drains abnormally fast (25% → 5% within ~15 tool calls in one session) #33634

Open

Description

@pantherstrategy

What version of Codex CLI is running?

codex-cli 0.144.5

What subscription do you have?

Plus

Which model were you using?

gpt-5.5 (medium reasoning)

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

ZED

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1784218627s since unix epoch",
  "overallStatus": "warning",
  "codexVersion": "0.144.5",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/Users/szymonnowicki/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/Users/szymonnowicki/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/Users/szymonnowicki/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/Users/szymonnowicki/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/Users/szymonnowicki/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth env vars present": "OPENAI_API_KEY",
        "auth file": "/Users/szymonnowicki/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "/Users/szymonnowicki/.codex",
        "config.toml": "/Users/szymonnowicki/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/Users/szymonnowicki/Local Sites/sklepledy/app/public/wp-content/themes/alufrost-shop",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, remote_plugin, plugin_sharing, image_generation, resize_all_images, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, personality, fast_mode, tui_app_server, remote_compaction_v2, workspace_dependencies",
        "feature flag overrides": "none",
        "feature flags enabled": "35",
        "log dir": "/Users/szymonnowicki/.codex/log",
        "mcp servers": "1",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "/Users/szymonnowicki/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.52.0",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/opt/homebrew/bin/git",
        "PATH git #2": "/usr/bin/git",
        "PATH git entries": "2",
        "git branch": "master",
        "git build options": "git version 2.52.0; cpu: arm64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; rust: disabled; feature: fsmonitor--daemon; libcurl: 8.7.1; zlib: 1.2.12; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
        "git exec path": "/opt/homebrew/opt/git/libexec/git-core",
        "git version": "git version 2.52.0",
        "repo detected": "true",
        "repo root": "/Users/szymonnowicki/Local Sites/sklepledy/app/public/wp-content/themes/alufrost-shop",
        "selected git": "/opt/homebrew/bin/git"
      },
      "remediation": null,
      "durationMs": 165
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/opt/homebrew/bin/codex",
        "current executable": "/opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin/codex",
        "install context": "npm (package /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin, bin /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin, resources /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-resources, path /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path)",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed by pnpm": "false",
        "managed package root": "/opt/homebrew/lib/node_modules/@openai/codex",
        "npm update target": "/opt/homebrew/lib/node_modules/@openai/codex"
      },
      "remediation": null,
      "durationMs": 167
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "warning",
      "summary": "MCP configuration has optional issues",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "pencil": "stdio command \"/Applications/Pencil.app/Contents/Resources/app.asar.unpacked/out/mcp-server-darwin-arm64\" is not resolvable (No such file or directory (os error 2))",
        "stdio servers": "1"
      },
      "remediation": "Set the missing MCP env vars or disable the affected server.",
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "openai API base URL": "https://api.openai.com/v1 reachable (HTTP 404)",
        "openai API route probe": "https://api.openai.com/v1/<redacted> route exists (HTTP 401)",
        "reachability mode": "API key auth"
      },
      "remediation": null,
      "durationMs": 914
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 0 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 857
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on macos-aarch64",
      "details": {
        "commit": "unknown",
        "current executable": "/opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin/codex",
        "install method": "npm (package /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin, bin /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin, resources /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-resources, path /opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path)",
        "platform": "macos-aarch64",
        "version": "0.144.5"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/opt/homebrew/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path/rg",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "/Users/szymonnowicki/.codex/tmp/arg0/codex-arg0c5E1fb/codex-execve-wrapper",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "/Users/szymonnowicki/.codex (dir)",
        "active rollout files": "2402 files, 153024721 total bytes, 63707 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "/Users/szymonnowicki/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/Users/szymonnowicki/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/Users/szymonnowicki/.codex/log (dir)",
        "memories DB": "/Users/szymonnowicki/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/Users/szymonnowicki/.codex (dir)",
        "state DB": "/Users/szymonnowicki/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 2853
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "2402",
        "rollout DB active rows": "2402",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "0",
        "rollout DB archived rows": "0",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=2402",
        "rollout DB rows": "2402",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "exec=2265, cli=136, vscode=1",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 3103
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language pl-PL",
      "details": {
        "EDITOR": "not set",
        "LANG": "en_US.UTF-8",
        "VISUAL": "not set",
        "os": "Mac OS 15.6.1 [64-bit]",
        "os language": "pl-PL",
        "os type": "Mac OS",
        "os version": "15.6.1"
      },
      "remediation": null,
      "durationMs": 6
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORTERM": "truecolor",
        "TERM_PROGRAM": "zed",
        "color output": "enabled",
        "effective locale": "en_US.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "unknown",
        "terminal size": "90x29",
        "terminal version": "1.10.3+stable.324.0c54c414d522234de7298039708ffe85a116892a"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "git repo root",
        "terminal title project value": "alufrost-shop",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.144.5",
        "check for update on startup": "true",
        "dismissed version": "0.140.0",
        "last checked at": "2026-07-16T05:39:16.971881Z",
        "latest version": "0.144.5",
        "latest version status": "current version is not older",
        "npm update target": "/opt/homebrew/lib/node_modules/@openai/codex",
        "update action": "npm install -g @openai/codex",
        "version cache": "/Users/szymonnowicki/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 672
    }
  }
}

What issue are you seeing?

Monthly token usage limit drained from 25% remaining to 5% remaining within a single working session, across roughly 15 tool calls (mostly Read/Search on existing files, no large file writes). No corresponding heavy task was run — the calls were standard file reads (Read on ProductController.php, archive-product.blade.php, ArchiveProductController.php, single-product.blade.php, SettingsShop.php, ajax.php, vite.config.js, etc.) in a WordPress/Bedrock/Sage theme repo.

Notably, this session was a resumed session after an earlier prompt was interrupted mid-run:

■ Conversation interrupted - tell the model what to do differently.

I re-sent the same prompt immediately after the interruption. It's possible the interrupted session's context/cache was not properly cleared and got double-counted when the same prompt was re-run, causing inflated token accounting.

For reference, the prior task in the same CLI session reported:

Token usage: total=188 124 input=172 050 (+ 3 523 328 cached) output=16 074 (reasoning 3074)

This is a very large cached-token count relative to the actual output, which raises the question of whether cached context is being over-counted against the monthly limit, especially across resumed/interrupted sessions.

I have never used more than ~50% of a single 5-hour window in normal use, so a monthly limit dropping this fast in one session is inconsistent with my typical usage pattern.

What steps can reproduce the bug?

  1. Start a Codex CLI session, run a task to completion (e.g. editing CSS/blade files), note token usage report.
  2. Start a new prompt in the same session.
  3. Interrupt the conversation mid-run (Conversation interrupted).
  4. Re-send the same prompt again without starting a fresh session.
  5. Continue running standard Read/Search tool calls (reading existing repo files, no large edits).
  6. Observe monthly usage limit banner dropping rapidly (25% → 10% → 5%) within a small number of read-only tool calls.

Thread/session id: 019f6b9c-a881-7ea1-add9-1da57a2c5d5e

What is the expected behavior?

Monthly usage limit should decrease proportionally to actual token consumption (input + output), and cached/resumed session context should not be double-counted after an interruption. Read-only exploration of a handful of moderately-sized files should not consume ~20% of a monthly quota in a single session.

Additional information

This matches patterns reported in other issues around the same period (e.g. #30918 — "Usage limits draining abnormally fast on Plus: 70% to 100% in about 6 minutes on July 2, 2026"), where OpenAI acknowledged a usage-accounting bug and shipped a fix on June 30, 2026, but users continued to report abnormal drains afterward. Happy to provide sanitized session logs if useful (redacting prompts/file contents).

Activity

  1. added
    CLIIssues related to the Codex CLI
    rate-limitsIssues related to rate limits, quotas, and token usage reporting
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on Jul 16, 2026
  2. github-actions commented on Jul 16, 2026

    @github-actions
    Contributor
  3. pantherstrategy commented on Jul 16, 2026

    @pantherstrategy
    Author

    Thanks — linking my case to these for visibility. Mechanism looks related (abnormal usage accounting)
    but the trigger differs: mine happened on gpt-5.5 medium (not 5.6/xhigh), with no subagents active,
    triggered specifically after a Conversation interrupted + immediate resume with the same prompt.
    No thread-list polling storm observed on my end (I'm on Codex CLI, not the desktop app).

    Adding 👍 to #32606 and #32591 as likely related root cause (usage-accounting regression),
    but keeping this open since the reproduction path is distinct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingrate-limitsIssues related to rate limits, quotas, and token usage reportingsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions