Codex (terra) repeatedly stopping prematurely

Open 💬 1 comment Opened Jul 23, 2026 by daveslutzkin
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.145.0

What subscription do you have?

Pro 20x

Which model were you using?

gpt-5.6-terra high

What platform is your computer?

Darwin 24.6.0 arm64 arm

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

iTerm2

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1784793068s since unix epoch",
  "overallStatus": "warning",
  "codexVersion": "0.145.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/Users/daveslutzkin/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/Users/daveslutzkin/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/Users/daveslutzkin/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/Users/daveslutzkin/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/Users/daveslutzkin/.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": "/Users/daveslutzkin/.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/daveslutzkin/.codex",
        "config.toml": "/Users/daveslutzkin/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/Users/daveslutzkin/dev/cadence",
        "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, skill_search, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, personality, fast_mode, tui_app_server, prevent_idle_sleep, remote_compaction_v2, workspace_dependencies",
        "feature flag overrides": "prevent_idle_sleep=true",
        "feature flags enabled": "37",
        "log dir": "/Users/daveslutzkin/.codex/log",
        "mcp servers": "1",
        "model": "gpt-5.6-terra",
        "model provider": "openai",
        "sqlite home": "/Users/daveslutzkin/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.39.5 (Apple Git-154)",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/usr/bin/git",
        "PATH git entries": "1",
        "git branch": "main",
        "git build options": "git version 2.39.5 (Apple Git-154); cpu: arm64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon",
        "git exec path": "/Library/Developer/CommandLineTools/usr/libexec/git-core",
        "git version": "git version 2.39.5 (Apple Git-154)",
        "repo detected": "true",
        "repo root": "/Users/daveslutzkin/dev/cadence",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 144
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/Users/daveslutzkin/.local/bin/codex",
        "current executable": "/Users/daveslutzkin/.local/bin/codex",
        "install context": "standalone (unix, package /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin, bin /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin/bin, resources /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin/codex-resources, path /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin/codex-path)",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed by pnpm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 3
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "streamable_http servers": "1"
      },
      "remediation": null,
      "durationMs": 3431
    },
    "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 404)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 263
    },
    "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": 640
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running standalone on macos-aarch64",
      "details": {
        "commit": "unknown",
        "current executable": "/Users/daveslutzkin/.local/bin/codex",
        "install method": "standalone (unix, package /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin, bin /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin/bin, resources /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin/codex-resources, path /Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-aarch64-apple-darwin/codex-path)",
        "platform": "macos-aarch64",
        "version": "0.145.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/Users/daveslutzkin/.codex/packages/standalone/releases/0.145.0-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/daveslutzkin/.codex/tmp/arg0/codex-arg0ENq3B7/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/daveslutzkin/.codex (dir)",
        "active rollout files": "732 files, 3347863503 total bytes, 4573584 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "/Users/daveslutzkin/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/Users/daveslutzkin/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/Users/daveslutzkin/.codex/log (dir)",
        "memories DB": "/Users/daveslutzkin/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/Users/daveslutzkin/.codex (dir)",
        "standalone release cache": "10 entries in /Users/daveslutzkin/.codex/packages/standalone/releases",
        "state DB": "/Users/daveslutzkin/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "/Users/daveslutzkin/.codex/thread_history_1.sqlite (missing)",
        "thread history DB integrity": "skipped (missing)"
      },
      "remediation": null,
      "durationMs": 676
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "warning",
      "summary": "rollout files and state DB thread inventory differ",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "722",
        "rollout DB active rows": "722",
        "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=722",
        "rollout DB rows": "722",
        "rollout DB scan cap reached": "false",
        "rollout DB scan error sample": [
          "/Users/daveslutzkin/.codex/sessions/2025/09/14/rollout-2025-09-14T18-59-05-081355a4-9e02-4fe9-a324-5d5f8af183e8.jsonl (rollout at /Users/daveslutzkin/.codex/sessions/2025/09/14/rollout-2025-09-14T18-59-05-081355a4-9e02-4fe9-a324-5d5f8af183e8.jsonl has no usable header record)",
          "/Users/daveslutzkin/.codex/sessions/2025/09/13/rollout-2025-09-13T20-21-21-ed51c30d-4543-4737-b391-1ec6c93b5491.jsonl (rollout at /Users/daveslutzkin/.codex/sessions/2025/09/13/rollout-2025-09-13T20-21-21-ed51c30d-4543-4737-b391-1ec6c93b5491.jsonl has no usable header record)",
          "/Users/daveslutzkin/.codex/sessions/2025/09/12/rollout-2025-09-12T19-14-15-f37c0d4e-f57c-4287-84cd-2972d63fb37b.jsonl (rollout at /Users/daveslutzkin/.codex/sessions/2025/09/12/rollout-2025-09-12T19-14-15-f37c0d4e-f57c-4287-84cd-2972d63fb37b.jsonl has no usable header record)",
          "/Users/daveslutzkin/.codex/sessions/2025/09/12/rollout-2025-09-12T19-12-38-43fb217a-3209-42d1-aa79-47f4e16bf270.jsonl (rollout at /Users/daveslutzkin/.codex/sessions/2025/09/12/rollout-2025-09-12T19-12-38-43fb217a-3209-42d1-aa79-47f4e16bf270.jsonl has no usable header record)",
          "/Users/daveslutzkin/.codex/sessions/2025/09/08/rollout-2025-09-08T11-46-19-cd9b68f3-6c0f-4511-b4fa-af7cc6073c16.jsonl (rollout at /Users/daveslutzkin/.codex/sessions/2025/09/08/rollout-2025-09-08T11-46-19-cd9b68f3-6c0f-4511-b4fa-af7cc6073c16.jsonl has no usable header record)"
        ],
        "rollout DB scan errors": "10",
        "rollout DB sources": "cli=654, subagent:thread_spawn=48, vscode=15, exec=4, subagent:review=1",
        "rollout DB stale rows": "0"
      },
      "issues": [
        {
          "severity": "warning",
          "cause": "rollout scan was incomplete or found bad files",
          "measured": "10 scan errors, 0 malformed names, scan cap reached: false",
          "expected": "rollout directories are fully scannable",
          "remedy": "Check file permissions and unexpected files under CODEX_HOME sessions.",
          "fields": []
        }
      ],
      "remediation": null,
      "durationMs": 369
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-AU",
      "details": {
        "EDITOR": "not set",
        "LANG": "en_AU.UTF-8",
        "LESS": "set",
        "PAGER": "set",
        "VISUAL": "not set",
        "os": "Mac OS 15.7.7 [64-bit]",
        "os language": "en-AU",
        "os type": "Mac OS",
        "os version": "15.7.7"
      },
      "remediation": null,
      "durationMs": 2
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORFGBG": "15;0",
        "COLORTERM": "truecolor",
        "TERMINFO_DIRS entry": [
          "/Applications/iTerm.app/Contents/Resources/terminfo (dir)",
          "/usr/share/terminfo (dir)"
        ],
        "TERM_PROGRAM": "iTerm.app",
        "color output": "enabled",
        "effective locale": "en_AU.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "iTerm2",
        "terminal size": "286x85",
        "terminal version": "3.6.10"
      },
      "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": "cadence",
        "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.145.0",
        "check for update on startup": "true",
        "last checked at": "2026-07-22T23:15:58.867970Z",
        "latest version": "0.145.0",
        "latest version status": "current version is not older",
        "update action": "standalone installer",
        "version cache": "/Users/daveslutzkin/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 507
    }
  }
}

What issue are you seeing?

The agent keeps stopping prematurely, saying things like:

• I’m continuing the implementation.

But that's the end of the output. It's doing this as frequently as every minute or two.

I performed a manual compaction and then the session seemed to get out of this loop and continue until the end of the task.

What steps can reproduce the bug?

Uploaded thread: 019f8d20-71ea-7443-bd09-e8ea7c422033

What is the expected behavior?

Coding agents need to be able to work unsupervised. It should keep going until the stated goal.

Additional information

_No response_

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #34033

Powered by Codex Action