Agent loop fails to start after task recognition (agent roop stops and waits for input)

Resolved 💬 22 comments Opened Feb 12, 2026 by Yosuke-Maeda Closed Feb 14, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.99.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Darwin 25.2.0 arm64 arm

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

Ghostty

What issue are you seeing?

Codex recognizes a task and outputs a message indicating that it is starting work (like the one below), but immediately after that, the agent loop does not start and it just stays in a state where it is waiting for user input.

---

Codex:
Perfect. I’ll execute in phased commits, starting with [...] and continue with the remaining tools and orchestrator.

AGENT ROOP STOPS HERE AND CODEX DOES NOT INITIATE THE WORK

What steps can reproduce the bug?

Thread ID: 019c4f8a-1a7d-7e43-b1bf-b8d4e486de53

What is the expected behavior?

Initiate an agent roop and work on the task.

Additional information

_No response_

View original on GitHub ↗

22 Comments

Adealia · 5 months ago

Facing the same issue, went ahead and downgraded to 0.98 as a temporary fix. As it stands it is unusable.

etraut-openai contributor · 5 months ago

@Yosuke-Maeda, thanks for the bug report. I see your thread ID in our database, but there were no session details uploaded. Perhaps it was interrupted prior to full upload. Are you seeing this consistently? Do you suspect it's a client regression -- i.e. have you seen it with previous versions of the CLI? If you downgrade to 0.98 (as @Adealia did), does the problem go away?

@Adealia, if you experience this again, please use /feedback to upload the session details and post the thread ID here. Without logs and session details, issues like this cannot generally be diagnosed.

Adealia · 5 months ago

@etraut-openai,

Thanks for the instruction and reply, I was able to recover the thread and did /feedback to submit logs for you.

thread ID 019c4fa8-036c-7710-bfe4-65af132f2097

To note, after my prompt of "Those files havent been created." and "Try again", I went ahead and downgraded back to 0.98.

etraut-openai contributor · 5 months ago

@Adealia, thanks. I looked at your session details, and this looks to me like model behavior, not something that's under the control of the client harness. So it might have just been coincidence that the problem stopped once you downgraded to 0.98. If you're willing to give it a try, could you try upgrading again to 0.99 and see if it's reproducible?

Adealia · 5 months ago

@etraut-openai,

I was able to reproduce the same behavior after updating back to 0.99.

thread ID 019c5015-365e-7960-84d4-d5dad12457ed

Yosuke-Maeda · 5 months ago

@etraut-openai, thanks for the prompt response. I first encountered this issue in version 0.98, and it occurs quite frequently in both the CLI and the app. However, I have noticed that it does not occur in another repository where I previously ran Codex, even with the same version (0.99) and without any configuration changes.

I have also submitted a new /feedback report in the Codex app. In that thread, Codex replied with “Implemented” despite no changes actually being made.

Thread ID: 019c490a-fa43-7561-84e0-1fcc9cad37cf

etraut-openai contributor · 5 months ago

@Yosuke-Maeda, thanks for uploading your session details. It looks like you used plan mode in this session. I suspect what is happening is that the plan mode instructions are "leaking through" to execution mode, so the agent is reluctant to execute the plan. You mentioned that you didn't see this behavior in another repo. Were you using plan mode there as well?

@Adealia, do you remember if you used plan mode in the sessions where you've observed this behavior? Just trying to validate my theory.

Adealia · 5 months ago

@etraut-openai, Plan mode was not used if you're referring to invoking it via /plan. However I did request it to create a plan to address xyz; but I am not sure if that is invoking plan mode just based on context.

jayjei14 · 5 months ago

it was looping again and again after compacted

Yosuke-Maeda · 5 months ago

@etraut-openai I did not use plan mode in the repository I mentioned earlier, where Codex is functioning without any issues. However, this problem still occurs even when I start a new chat and do not use plan mode at all.

For your reference, I have just created a new thread in a repository where Codex is exhibiting this issue, and I asked a simple question without using plan mode.

Thread ID: 019c50c2-a355-7c53-a04f-71af2fbe23a6

pakrym-oai contributor · 5 months ago

@Adealia/@Yosuke-Maeda do you have any config.toml settings that control reasoning?

pakrym-oai contributor · 5 months ago

Can you also try running mv ~/.codex/models_cache.json ~/.codex/models_cache.json.old ? And trying 0.100.0?

etraut-openai contributor · 5 months ago

We have a theory on this one. It appears that the CLI was defaulting to a reasoning level of "none", and that was causing the model to act strangely. Try this: use the /model slash command to select "gpt-5.3-codex", then select a reasoning level (like "medium"). This will explicitly set the reasoning level and store it back to your config file. Give that a try and let us know if it improves the behavior for you.

Yosuke-Maeda · 5 months ago

@pakrym-oai, thanks for the instruction. I don't think I have config.toml settings that control model reasoning. I also tried running the command you specified and upgraded to 0.101.0 but the issue still persists.

---

Here's my current config:

```config.toml
################################################################################

Core Model Selection

################################################################################

Primary model used by Codex. Default: "gpt-5.1-codex-max" on all platforms.

model = "gpt-5.3-codex"

Model used by the /review feature (code reviews). Default: "gpt-5.1-codex-max".

review_model = "gpt-5.1-codex-max"

Provider id selected from [model_providers]. Default: "openai".

model_provider = "openai"

Optional manual model metadata. When unset, Codex auto-detects from model.

Uncomment to force values.

model_context_window = 128000 # tokens; default: auto for model

model_auto_compact_token_limit = 0 # disable/override auto; default: model family specific

tool_output_token_limit = 10000 # tokens stored per tool output; default: 10000 for gpt-5.1-codex-max

################################################################################

Reasoning & Verbosity (Responses API capable models)

################################################################################

Reasoning effort: minimal | low | medium | high | xhigh (default: medium; xhigh on gpt-5.1-codex-max and gpt-5.2)

model_reasoning_effort = "xhigh"

Reasoning summary: auto | concise | detailed | none (default: auto)

model_reasoning_summary = "auto"

Text verbosity for GPT-5 family (Responses API): low | medium | high (default: medium)

model_verbosity = "medium"

Force-enable reasoning summaries for current model (default: false)

model_supports_reasoning_summaries = false

Force reasoning summary format: none | experimental (default: none)

model_reasoning_summary_format = "none"

################################################################################

Instruction Overrides

################################################################################

Additional user instructions appended after AGENTS.md. Default: unset.

developer_instructions = ""

Optional legacy base instructions override (prefer AGENTS.md). Default: unset.

instructions = ""

Inline override for the history compaction prompt. Default: unset.

compact_prompt = ""

Override built-in base instructions with a file path. Default: unset.

experimental_instructions_file = "/absolute/or/relative/path/to/instructions.txt"

Load the compact prompt override from a file. Default: unset.

experimental_compact_prompt_file = "/absolute/or/relative/path/to/compact_prompt.txt"

################################################################################

Web Search

################################################################################

Web search mode: disabled | cached | live. Default: "cached"

cached serves results from a web search cache (an OpenAI-maintained index).

cached returns pre-indexed results; live fetches the most recent data.

If you use --yolo or another full access sandbox setting, web search defaults to live.

web_search = "live"

################################################################################

Approval & Sandbox

################################################################################

When to ask for command approval:

- untrusted: only known-safe read-only commands auto-run; others prompt

- on-failure: auto-run in sandbox; prompt only on failure for escalation

- on-request: model decides when to ask (default)

- never: never prompt (risky)

approval_policy = "on-request"

Filesystem/network sandbox policy for tool calls:

- read-only (default)

- workspace-write

- danger-full-access (no sandbox; extremely risky)

sandbox_mode = "workspace-write"
personality = "friendly"

Extra settings used only when sandbox_mode = "workspace-write".

[sandbox_workspace_write]

Additional writable roots beyond the workspace (cwd). Default: []

writable_roots = []

Allow outbound network access inside the sandbox. Default: false

network_access = true

Exclude $TMPDIR from writable roots. Default: false

exclude_tmpdir_env_var = false

Exclude /tmp from writable roots. Default: false

exclude_slash_tmp = false

################################################################################

Shell Environment Policy for spawned processes

################################################################################

[shell_environment_policy]

inherit: all (default) | core | none

inherit = "all"

Skip default excludes for names containing KEY/TOKEN (case-insensitive). Default: false

ignore_default_excludes = false

Case-insensitive glob patterns to remove (e.g., "AWS_", "AZURE_"). Default: []

exclude = []

Explicit key/value overrides (always win). Default: {}

set = {}

Whitelist; if non-empty, keep only matching vars. Default: []

include_only = []

Experimental: run via user shell profile. Default: false

experimental_use_profile = false

################################################################################

History & File Opener

################################################################################

[history]

save-all (default) | none

persistence = "save-all"

Maximum bytes for history file; oldest entries are trimmed when exceeded. Example: 5242880

max_bytes = 0

URI scheme for clickable citations: vscode (default) | vscode-insiders | windsurf | cursor | none

file_opener = "vscode"

################################################################################

UI, Notifications, and Misc

################################################################################

[tui]

Desktop notifications from the TUI: boolean or filtered list. Default: true

Examples: false | ["agent-turn-complete", "approval-requested"]

notifications = false

Enables welcome/status/spinner animations. Default: true

animations = true

Suppress internal reasoning events from output. Default: false

hide_agent_reasoning = false

Show raw reasoning content when available. Default: false

show_raw_agent_reasoning = false

Disable burst-paste detection in the TUI. Default: false

disable_paste_burst = false

Track Windows onboarding acknowledgement (Windows only). Default: false

windows_wsl_setup_acknowledged = false

External notifier program (argv array). When unset: disabled.

Example: notify = ["notify-send", "Codex"]

notify = ["python3", "/Users/<user>/.codex/notify.py"]

In-product notices (mostly set automatically by Codex).

[notice]

hide_full_access_warning = true

hide_rate_limit_model_nudge = true

################################################################################

Authentication & Login

################################################################################

Where to persist CLI login credentials: file (default) | keyring | auto

cli_auth_credentials_store = "file"

Base URL for ChatGPT auth flow (not OpenAI API). Default:

chatgpt_base_url = "https://chatgpt.com/backend-api/"

Restrict ChatGPT login to a specific workspace id. Default: unset.

forced_chatgpt_workspace_id = ""

Force login mechanism when Codex would normally auto-select. Default: unset.

Allowed values: chatgpt | api

forced_login_method = "chatgpt"

Preferred store for MCP OAuth credentials: auto (default) | file | keyring

mcp_oauth_credentials_store = "auto"

################################################################################

Project Documentation Controls

################################################################################

Max bytes from AGENTS.md to embed into first-turn instructions. Default: 32768

project_doc_max_bytes = 32768

Ordered fallbacks when AGENTS.md is missing at a directory level. Default: []

project_doc_fallback_filenames = "CLAUDE.md"

[notice.model_migrations]
"gpt-5.2" = "gpt-5.2-codex"
"gpt-5.1-codex-max" = "gpt-5.2-codex"

################################################################################

Tools (legacy toggles kept for compatibility)

################################################################################

[tools]

(Alias accepted)

################################################################################

Centralized Feature Flags (preferred)

################################################################################

[features]
rmcp_client = true
apply_patch_freeform = false
view_image_tool = true
ghost_commit = false
skills = false
unified_exec = true
steer = true

[mcp_servers.context7]
url = "https://mcp.context7.com/mcp"

[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"

[mcp_servers.openaiDeveloperDocs]
url = "https://developers.openai.com/mcp"

[mcp_servers.chrome-devtools]

command = "npx"

args = ["chrome-devtools-mcp@latest",

"--browser-url=http://127.0.0.1:9222"

]

--- Example: STDIO transport ---

[mcp_servers.docs]

command = "docs-server" # required

args = ["--port", "4000"] # optional

env = { "API_KEY" = "value" } # optional key/value pairs copied as-is

env_vars = ["ANOTHER_SECRET"] # optional: forward these from the parent env

cwd = "/path/to/server" # optional working directory override

startup_timeout_sec = 10.0 # optional; default 10.0 seconds

# startup_timeout_ms = 10000 # optional alias for startup timeout (milliseconds)

tool_timeout_sec = 60.0 # optional; default 60.0 seconds

enabled_tools = ["search", "summarize"] # optional allow-list

disabled_tools = ["slow-tool"] # optional deny-list (applied after allow-list)

--- Example: Streamable HTTP transport ---

[mcp_servers.github]

url = "https://github-mcp.example.com/mcp" # required

bearer_token_env_var = "GITHUB_TOKEN" # optional; Authorization: Bearer <token>

http_headers = { "X-Example" = "value" } # optional static headers

env_http_headers = { "X-Auth" = "AUTH_ENV" } # optional headers populated from env vars

startup_timeout_sec = 10.0 # optional

tool_timeout_sec = 60.0 # optional

enabled_tools = ["list_issues"] # optional allow-list

################################################################################

Model Providers (extend/override built-ins)

################################################################################

Built-ins include:

- openai (Responses API; requires login or OPENAI_API_KEY via auth flow)

- oss (Chat Completions API; defaults to http://localhost:11434/v1)

[model_providers]

--- Example: override OpenAI with explicit base URL or headers ---

[model_providers.openai]

name = "OpenAI"

base_url = "https://api.openai.com/v1" # default if unset

wire_api = "responses" # "responses" | "chat" (default varies)

# requires_openai_auth = true # built-in OpenAI defaults to true

# request_max_retries = 4 # default 4; max 100

# stream_max_retries = 5 # default 5; max 100

# stream_idle_timeout_ms = 300000 # default 300_000 (5m)

# experimental_bearer_token = "sk-example" # optional dev-only direct bearer token

# http_headers = { "X-Example" = "value" }

# env_http_headers = { "OpenAI-Organization" = "OPENAI_ORGANIZATION", "OpenAI-Project" = "OPENAI_PROJECT" }

--- Example: Azure (Chat/Responses depending on endpoint) ---

[model_providers.azure]

name = "Azure"

base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"

wire_api = "responses" # or "chat" per endpoint

query_params = { api-version = "2025-04-01-preview" }

env_key = "AZURE_OPENAI_API_KEY"

# env_key_instructions = "Set AZURE_OPENAI_API_KEY in your environment"

--- Example: Local OSS (e.g., Ollama-compatible) ---

[model_providers.ollama]

name = "Ollama"

base_url = "http://localhost:11434/v1"

wire_api = "chat"

################################################################################

Profiles (named presets)

################################################################################

Active profile name. When unset, no profile is applied.

profile = "default"

[profiles.vibe-code]
approval_policy = "never"
sandbox_mode = "workspace-write"
model = "gpt-5.2-codex"
model_reasoning_effort = "xhigh"

[profiles.textbook-notion_load-prompt]
model = "gpt-5.2"
model_reasoning_effort = "none"

[profiles.textbook-notion_exec-formatter]
model = "gpt-5.2"
model_reasoning_effort = "minimal"

[profiles.skill-editor]
approval_policy = "untrusted"
sandbox_mode = "workspace-write"
model_instructions_file = "/Users/<user>/Documents/Resources/Prompts/DevInstructions/skill-edit.md"
model = "gpt-5.3-codex"
model_reasoning_effort = "medium"

[profiles.default]

model = "gpt-5.1-codex-max"

model_provider = "openai"

approval_policy = "on-request"

sandbox_mode = "read-only"

model_reasoning_effort = "medium"

model_reasoning_summary = "auto"

model_verbosity = "medium"

chatgpt_base_url = "https://chatgpt.com/backend-api/"

experimental_compact_prompt_file = "compact_prompt.txt"

include_apply_patch_tool = false

experimental_use_freeform_apply_patch = false

tools_web_search = false

tools_view_image = true

features = { unified_exec = false }

################################################################################

Projects (trust levels)

################################################################################

Mark specific worktrees as trusted. Only "trusted" is recognized.

[projects]

[projects."/absolute/path/to/project"]

trust_level = "trusted"

################################################################################

OpenTelemetry (OTEL) – disabled by default

################################################################################

[otel]

Include user prompt text in logs. Default: false

log_user_prompt = false

Environment label applied to telemetry. Default: "dev"

environment = "dev"

Exporter: none (default) | otlp-http | otlp-grpc

exporter = "none"

Example OTLP/HTTP exporter configuration

[otel.exporter."otlp-http"]

endpoint = "https://otel.example.com/v1/logs"

protocol = "binary" # "binary" | "json"

[otel.exporter."otlp-http".headers]

"x-otlp-api-key" = "${OTLP_TOKEN}"

Example OTLP/gRPC exporter configuration

[otel.exporter."otlp-grpc"]

endpoint = "https://otel.example.com:4317",

headers = { "x-otlp-meta" = "abc123" }

Example OTLP exporter with mutual TLS

[otel.exporter."otlp-http"]

endpoint = "https://otel.example.com/v1/logs"

protocol = "binary"

[otel.exporter."otlp-http".headers]

"x-otlp-api-key" = "${OTLP_TOKEN}"

[otel.exporter."otlp-http".tls]

ca-certificate = "certs/otel-ca.pem"

client-certificate = "/etc/codex/certs/client.pem"

client-private-key = "/etc/codex/certs/client-key.pem"

etraut-openai contributor · 5 months ago

@Yosuke-Maeda, I think the problem is because of model_supports_reasoning_summaries = false. Try commenting that line out. In general, I recommend keeping your config file as clean as possible. Don't override defaults unless you have good reason to do so.

Adealia · 5 months ago

@pakrym-oai & @etraut-openai,

Updated to v0.101.0 and continued to face the issue, see attached:

thread ID 019c5456-f7c6-7002-b984-8edf349f1d2b

No success with instructions. Renamed the cache as instructed. Here is a snippet of my config:

config.toml

# =========================
# Model defaults (global)
# =========================
model = "gpt-5.3-codex"              # string - profile override for default model.
model_reasoning_effort = "xhigh"     # none|low|medium|high|xhigh - profile reasoning depth override.
model_verbosity = 'medium'           # low|medium|high - response verbosity preference.
model_reasoning_summary = 'concise'  # auto|concise|detailed|none - include a reasoning summary.
personality = 'pragmatic'      # string - default assistant personality style.

---

Edit: I do not have model_supports_reasoning_summaries in my config.

etraut-openai contributor · 5 months ago

@Adealia, I can confirm from your logs that the reasoning level sent to the model is null, which explains the behavior you're seeing. Based on your config, it's not clear to me why this is occurring. Is that your entire config file? Do you have any local (project-scoped) config file that overrides values in your global config file?

Adealia · 5 months ago

@etraut-openai,

Interesting, here is my config.toml minus my project's trust_level. I'll see about dropping the profile usage and see if that resolves it as that is the only thing I could think that might be causing it?

Just for additional information, all these threads are assumed to be under Daily, as I haven't started up codex using the Danger profile intentionally for these.

---
config.toml

#:schema https://developers.openai.com/codex/config-schema.json

# Codex CLI configuration (TOML)
# Profiles are CLI-only. Switch with:
#   codex --profile Daily
#   codex --profile Danger

# =========================
# Profile selection (global)
# =========================
profile = 'Daily'                    # 'Daily'|'Danger' - which [profiles.*] config is active by default.

# =========================
# Model defaults (global)
# =========================
model = 'gpt-5.2'                    # string - default model ID for sessions.
model_reasoning_effort = 'xhigh'      # none|low|medium|high|xhigh - reasoning depth/latency tradeoff.
model_verbosity = 'medium'           # low|medium|high - response verbosity preference.
model_reasoning_summary = 'concise'  # auto|concise|detailed|none - include a reasoning summary.
personality = 'pragmatic'      # string - default assistant personality style.

# =========================
# Execution + safety (global)
# =========================
approval_policy = 'on-request'       # untrusted|on-failure|on-request|never - when to ask before running commands.
sandbox_mode = 'workspace-write'     # read-only|workspace-write|danger-full-access - sandbox mode for commands.
file_opener = 'vscode'               # vscode|cursor|windsurf|none - editor integration.

# =========================
# Web search (global fallback)
# =========================
web_search = 'cached'                # disabled|cached|live - default web search mode.

# =========================
# Shell environment policy
# =========================
[shell_environment_policy]
inherit = 'all'                     # all|core|none - baseline env inheritance for shell commands.

# =========================
# Feature flags (global)
# =========================
[features]
shell_tool = true                    # true|false - enable shell command execution.
undo = true                          # true|false - keep per-turn snapshots for easier rollback.
apply_patch_freeform = false         # true|false - allow less-structured patching (riskier).
powershell_utf8 = true               # true|false - Windows: force PowerShell UTF-8 output capture.
experimental_windows_sandbox = true  # true|false - Windows: restricted-token sandbox (experimental).
elevated_windows_sandbox = true      # true|false - Windows: elevated sandbox pipeline (experimental).
personality = true                   # true|false - enable personality controls.
steer = true                         # true|false - enable steer/custom instruction controls.
unified_exec = true                  # true|false - enable unified command execution sessions.
shell_snapshot = true                # true|false - capture shell state snapshots between turns.

# =========================
# Sandbox: workspace-write
# =========================
[sandbox_workspace_write]
network_access = true                # true|false - allow sandboxed commands to use the network (git, package managers, etc.).

# =========================
# Profiles (CLI-only)
# =========================
[profiles.Daily]
model = "gpt-5.3-codex"              # string - profile override for default model.
model_reasoning_effort = "xhigh"     # none|low|medium|high|xhigh - profile reasoning depth override.

[profiles.Danger]
sandbox_mode = 'danger-full-access'  # read-only|workspace-write|danger-full-access - disable sandbox restrictions.
Yosuke-Maeda · 5 months ago

@etraut-openai I've commented out model_supports_reasoning_summaries = false as instructed, restarted Codex and now I'm no longer seeing the issue. For context, I adopted this sample config file from the official docs a little while ago and I haven't touched this part of the file so it's a bit weird that I started to see this issue now. But anyway, thank you for your advice!

pakrym-oai contributor · 5 months ago

@Adealia do you have ~/.codex/models_cache.json file? Is gpt-5.3-codex entry in it? Is there anything in your environment that may be disabling remote_models feature? or some other config:

/// - user      `${CODEX_HOME}/config.toml`
/// - cwd       `${PWD}/config.toml` (loaded but disabled when the directory is untrusted)
/// - tree      parent directories up to root looking for `./.codex/config.toml` (loaded but disabled when untrusted)
/// - repo      `$(git rev-parse --show-toplevel)/.codex/config.toml` (loaded but disabled when untrusted)
/// - runtime   e.g., --config flags, model selector in UI
Adealia · 5 months ago

@pakrym-oai, I renamed that file as instructed earlier, but both the backup and new one have gpt-5.3-codex entries.

Only configuration I have touched is the one located at C:\Users\Adealia\.codex\config.toml, but after checking I don't believe I have or had any additional config files.

It seems that disabling profiles has improved the behavior from what I can tell.

Keesan12 · 1 month ago

This feels like a lifecycle gap between "task accepted" and "loop actually started", not just a reasoning problem.

The guard I would want is a short startup deadline: once the agent says it is starting work, it should either emit the first real step/tool call within a bounded window or surface a typed blocked state instead of sitting there looking alive.

That gives the user a clean stop reason and makes this class of failure much easier to debug. Silent no-op loops kill trust almost as fast as the expensive retry loops.