codex gets stuck in endless loop fixing its own mistakes and charges users for CPU time / credits to fix its own errors

Resolved 💬 2 comments Opened Jun 6, 2026 by mikeNickaloff Closed Jun 6, 2026

What version of Codex CLI is running?

codex-cli 0.136.0

What subscription do you have?

Plus

Which model were you using?

GPT-5.5 reasoning high

What platform is your computer?

Linux 6.17.0-35-generic x86_64 unknown

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

konsole -> zsh

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1780722963s since unix epoch",
  "overallStatus": "warning",
  "codexVersion": "0.136.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/home/mike/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/home/mike/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/home/mike/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/home/mike/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/home/mike/.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 file": "/home/mike/.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": "/home/mike/.codex",
        "config.toml": "/home/mike/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/home/mike/build/qhtml6",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, terminal_resize_reflow, sqlite, memories, hooks, use_linux_sandbox_bwrap, enable_request_compression, multi_agent, apps, tool_suggest, plugins, in_app_browser, browser_use, browser_use_external, computer_use, plugin_sharing, external_migration, image_generation, skill_mcp_dependency_install, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, workspace_dependencies",
        "feature flag overrides": "memories=true, use_linux_sandbox_bwrap=true, external_migration=true",
        "feature flags enabled": "30",
        "legacy feature flag": "collab -> multi_agent",
        "log dir": "/home/mike/.codex/log",
        "mcp servers": "0",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "/home/mike/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.51.0",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/usr/bin/git",
        "PATH git #2": "/bin/git",
        "PATH git entries": "2",
        "git branch": "main",
        "git build options": "git version 2.51.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; libcurl: 8.14.1; zlib: 1.3.1; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
        "git exec path": "/usr/lib/git-core",
        "git version": "git version 2.51.0",
        "repo detected": "true",
        "repo root": "/home/mike/build/qhtml6",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 50
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/usr/local/bin/codex",
        "current executable": "/usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
        "install context": "npm (package /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed package root": "/usr/local/lib/node_modules/@openai/codex",
        "npm update target": "/usr/local/lib/node_modules/@openai/codex"
      },
      "remediation": null,
      "durationMs": 413
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "no MCP servers configured",
      "details": {},
      "remediation": null,
      "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": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 181
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 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": 597
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on linux-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "/usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
        "install method": "npm (package /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
        "platform": "linux-x86_64",
        "version": "0.136.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/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": "/home/mike/.codex/tmp/arg0/codex-arg0DXlkp3/codex-linux-sandbox",
        "execve wrapper helper": "/home/mike/.codex/tmp/arg0/codex-arg0DXlkp3/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": "/home/mike/.codex (dir)",
        "active rollout files": "373 files, 1065705030 total bytes, 2857118 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "/home/mike/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/home/mike/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/home/mike/.codex/log (dir)",
        "memories DB": "/home/mike/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/home/mike/.codex (dir)",
        "state DB": "/home/mike/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 220
    },
    "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": "373",
        "rollout DB active rows": "373",
        "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=373",
        "rollout DB rows": "373",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=309, subagent:thread_spawn=45, exec=11, vscode=8",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 6418
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-US",
      "details": {
        "LANG": "en_US.UTF-8",
        "os": "Ubuntu 25.10.0 (questing) [64-bit]",
        "os language": "en-US",
        "os type": "Ubuntu",
        "os version": "25.10.0"
      },
      "remediation": null,
      "durationMs": 18
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORFGBG": "15;0",
        "COLORTERM": "truecolor",
        "DISPLAY": "present",
        "WAYLAND_DISPLAY": "present",
        "color output": "enabled",
        "effective locale": "en_US.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "Konsole",
        "terminal size": "160x43",
        "terminal version": "250801"
      },
      "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": "qhtml6",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "warning",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.137.0",
        "check for update on startup": "true",
        "dismissed version": "0.129.0",
        "last checked at": "2026-06-05T20:57:05.371390127Z",
        "latest version probe": "curl: (28) Resolving timed out after 5000 milliseconds",
        "npm update target": "/usr/local/lib/node_modules/@openai/codex",
        "update action": "npm install -g @openai/codex",
        "version cache": "/home/mike/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 5420
    }
  }
}

What issue are you seeing?

Codex using Gpt 5.5 frequently makes mistakes and then attempts to correct them, resulting in it making changes which often times will break other parts of the code, then re-testing, discovering the bugs it introduced and then makes additional changes, often times unrelated to the original prompt, resulting in re-testing, discovery of the new bugs it introduced, and then attempting to fix those bugs, and on and on..while this behavior is annoying, its not the end of the world. The issue is that OpenAI is charging users their time / cpu limit / credits for codex to create bugs and then fix them 20 times before finally getting all the bugs fixed and everything working.

This is the kind of thing that will cause people to cancel subscriptions and seek better alternatives..l you mostdef need to address this issue quickly.

What steps can reproduce the bug?

Uploaded thread: 019e7d20-a094-7a22-875d-465b236fea1a

What is the expected behavior?

OpenAI should bear the cost of their model messing up and having to clean up after its own mistakes, that should not be transferred onto users when the bug that is introduced is caused by codex 100% -- This type of messing up then trying one thing, seeing if it works, and then testing to see if anything else got messed up by thoses changes should all be happening behind the scenes and not running out our credits. It should not eat up 5 hours of time to create a feature that realistically was 10 seconds of coding, and 1 hour of making little modifications then testing and then fixing its modifications and other things it caused to not work and that somehow adds up to 5 hours???

Did somebody accidentally add in the Microsoft Windows Operating System development handbook into one of the layers in GPT 5.5's model or something? If so tell those people at Microsoft that their changes completely broke ChatGPT and are causing loyal customers to stop using ChatGPT (and if not addressed will cause everybody to leave) No matter how great the model is, nothing is worth watching it mess up for 3 hours over and over again and barely accomplishing anything.

Additional information

All these are tests that chatgpt ran on its own, costing me over 500 credits to implement one simple feature that was about 10 lines of code.
-------

• I’m extending the existing behavior animation group visual test rather than adding a separate harness. The new case uses q-property width, q-animation-queue,
omitted from/to defaults, and the duration 600 shorthand.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The visual test now covers the requested queue case and confirms a single delayed changed signal. I’m updating the docs to match the new accepted child
animation forms.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The generated module docs had the old “only q-property-animation” wording. I’m updating parser and renderer module API docs plus README to describe the queue/
group behavior accurately.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• Docs are aligned with the new behavior tree support. I’m rebuilding the release bundle now so dist/qhtml.js and doc/qhtml.js include the parser/runtime
changes.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The generated bundle is refreshed. I’m running syntax checks and a headless pass of the behavior group visual test to catch runtime issues in the queue path.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The syntax checks passed, but the visual test still reports data-status="fail". The queue case itself did fire exactly one changed event; the failure appears
tied to the older style assertions in that page, so I’m isolating the behavior queue path with a smaller headless smoke instead of relying on that mixed
visual page.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The isolated smoke page creation succeeded, but Chrome hit a sandbox-level crashpad permission issue on that run. I’m rerunning just the browser invocation
with the same flags under the approved elevated path.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The isolated queue smoke shows the key behavior works: final value reached and the changed hook fired once. I’m checking a single q-property-animation
behavior hook too, because the older mixed visual page didn’t show its step attributes in headless output.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The final changed signal works, but behavior hook metadata is not being executed in the smoke. I’m checking the parsed behavior metadata to see whether the
hook blocks are being preserved under the animation node.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The parser preserves the hook blocks correctly. The hook execution path is failing because behavior hooks are called with this bound to the component host,
while these hooks use the normal QHTML convention this.component. I’m checking the component self-reference helper and will make the hook invocation use the
same inherited context shape as component scripts.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The behavior hooks were running before the final unsuppressed property commit, and that final commit can refresh the component host, wiping hook-written
attributes in tests. I’m moving property animation onstopped/onended to run after the completion callback so single-animation behavior keeps the old
observable order.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• That ordering fix is in source. I’m rebuilding and rerunning the focused smoke tests.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The hook body is being preserved, but this.component in behavior hooks is not producing observable writes. I’m checking whether the hook path itself works
with direct this, then I’ll either fix the hook context or keep the change scoped to the queue behavior if the older hook convention is already unstable.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The hook path is not running because the behavior is falling through to a direct commit in this smoke. I’m checking whether the behavior lookup is failing due
to property-name normalization/casing before touching the runner again.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The delay smoke confirms the write is not entering behavior at all on the first onready assignment. The setter only starts behavior when it thinks a previous
value exists; for this path it does not. I’m adjusting that guard so declared defaults count as the previous value for behavior interception.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The behavior lookup is probably blocked by the setter’s hadValue guard on this first runtime assignment. I’m removing that extra gate; the behavior runner
already falls back safely if it cannot parse a valid previous/from value.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The guard is relaxed. I’m rebuilding and rerunning the delay, single, and queue smokes.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The runner is still falling back because previousValue is undefined for this first assignment, so omitted from cannot parse. I’m setting the declared literal
default as the previous value in that setter path.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The getter path can mark hadValue even when it resolves to undefined, so I’m tightening that fallback to cover undefined previous values too.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• That fallback is corrected. I’m rebuilding and rerunning the same focused browser smokes.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗