[Bug] Global Tool-Calling Regression: Native tools drop and raw <thinking> tags leak across sessions during model switching

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

What version of the Codex App are you using (From “About Codex” dialog)?

26.819.11345

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

Brief Summary

Global failure of native client tools (Terminal/File I/O) occurs across all projects and sessions. The model enters an infinite loop attempting to call tools, emitting unparsed raw <thinking> tags, and erroring out with Tool parser repeatedly rejecting malformed call. Switching models (e.g., from gpt-5.6-sol to terra) exacerbates or triggers this breakdown.

---

Environment Details

  • App Name / Platform: Codex Desktop App (macOS)
  • OS Version: macOS (Darwin arm64)
  • Client Action Taken: Fresh reinstall, complete deletion of ~/.codex, ~/Library/Application Support/Codex, and app sandboxes (issue persists after clean reinstall).

---

Actual Behavior

  1. Tool Chain Breakdown: The agent loses access to native tools (functions.exec, file system reader, terminal, MCPs) and falls back strictly to collaboration / wait interfaces.
  2. Raw CoT Leakage: Internal reasoning tags (<thinking>...</thinking>) are leaked directly into the chat response stream instead of being processed by the UI parser.
  3. Infinite Tool Retry Loop: The model repeatedly attempts to invoke functions.exec using various payload syntax formats, but all attempts are rejected by the client-side parser.

---

Error Logs & Model Output Evidence

Here is the exact raw output stream emitted by the model during the failure:

我会重新从 docs/START.md 定位阅读范围,然后系统研读 01–13、现有 ADR、任务记录与报告...
<thinking>Reading indexed docs and project progress</thinking>
<thinking>Using available exec tool</thinking>
<thinking>Trying to invoke exec via commentary</thinking>
<thinking>Tool invocation syntax issue</thinking>
<thinking>Switching to known functions.exec format</thinking>
<thinking>Tool call channel confusion</thinking>
<thinking>Attempting explicit function call payload</thinking>
<thinking>Correcting tool name to functions.exec</thinking>
<thinking>Switching to collaboration to inspect docs</thinking>
<thinking>Resolving tool invocation errors</thinking>
<thinking>Checking function tool declarations</thinking>
<thinking>Fallback to collaboration wait for tool state</thinking>
<thinking>Attempting to call shell through functions.exec</thinking>
<thinking>Trying to use provided exec tool schema</thinking>
<thinking>Using collaboration tools only when explicitly needed</thinking>
<thinking>Tool parser repeatedly rejecting malformed call; retrying correct payload</thinking>
<thinking>Switching call structure explicitly</thinking>
<thinking>Potential tool outage; checking with collaboration list</thinking>
<thinking>Inspecting available namespace directly</thinking>
<thinking>Trying direct shell tool invocation despite hidden declaration</thinking>
<thinking>Diagnosing inability to invoke command tools</thinking>
<thinking>Retrying proper exec call syntax</thinking>
<thinking>Considering direct textual tool call</thinking>
<thinking>Using functions.exec according to documented schema</thinking>
<thinking>Tool invocation stuck; trying alternate channel</thinking>
<thinking>Testing whether shell command execution is possible via commentary tool</thinking>
<thinking>Continuing despite tool parser glitch</thinking>
<thinking>Attempting raw exec namespace</thinking>
<thinking>Tool issue persists; attempting command via collaboration agent</thinking>
<thinking>Retry with explicit JSON object</thinking>
<thinking>Considering that functions.exec may be unavailable in current tool set</thinking>
<thinking>Attempting to issue shell command through wait tool impossible</thinking>
<thinking>Trying call with actual arguments instead of empty</thinking>
<thinking>Root tool registry only exposing collaboration tools; using available exec from previous context unavailable</thinking>
<thinking>Need proceed with document reading; tool invocation likely malformed by interface. Try known functions.exec symbol explicitly in source</thinking>
<thinking>Escalating issue? Try collaboration spawn with valid required fields</thinking>
<thinking>I accidentally keep emitting empty object due to tool UI; manually construct JSON</thinking>
<thinking>Attempting to use the intended namespace directly in tool target</thinking>

<img width="1544" height="1174" alt="Image" src="https://github.com/user-attachments/assets/1c411c2c-32df-4494-9b78-a530083d932e" />

What steps can reproduce the bug?

Steps to Reproduce

  1. Open any workspace in Codex Desktop App (e.g., /Users/gokyrie/projects/vg-api).
  2. Send an initial instruction requiring local tool execution (e.g., Exploring project docs).
  3. Switch active models mid-session or initialize a task using specific model variants (e.g., switching from gpt-5.6-sol to terra).
  4. Prompt the agent to perform read/exec actions on project documents.

What is the expected behavior?

Expected Behavior

The agent should parse the tool schema properly, silently execute the underlying shell/read tools via internal IPC, render the Chain of Thought appropriately, and return the aggregated markdown file contents.

Additional information

_No response_

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 7 days ago

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

  • #38960

Powered by Codex Action