Codex Desktop: functions.exec fails with `code-mode host has too many active cells`

Open 💬 0 comments Opened Jul 14, 2026 by JWMatheo

Summary

Codex Desktop became unable to execute any further tool call because the internal runner returned:

code-mode host has too many active cells

This happened before any shell command output was produced.

Exact error

code-mode host has too many active cells

Reproduction

In the same Codex Desktop task, call functions.exec with any of the following minimal payloads:

text("test");
text("retry");
text(1);
text("probe");
exit();

Every attempt returned the exact same error before producing a normal tool result.

The first real attempt also tried to run three read-only shell commands through nested exec_command calls. It failed with the same error before returning any shell output.

Expected behavior

A new functions.exec call should either:

  • execute normally; or
  • return a diagnostic that identifies the still-running cell, process, or resource holding the slot.

A recoverable way to terminate stale cells would also be useful.

Actual behavior

  • functions.exec was rejected immediately.
  • No shell output was returned.
  • exec_command was not reached from the model's perspective.
  • The failure persisted across repeated attempts.
  • The error did not expose a stack trace, timestamp, cell ID, active-cell list, or cleanup action.

Impact

The task could not continue. I could not inspect the repository, query GitHub, or perform any local command while the runner was in this state.

This did not look like a Git, GitHub, repository, shell, or application-code error. The failure occurred at the internal code-mode host layer.

Additional diagnostic attempt

A manual wait using an unknown cell identifier returned:

Script failed
Script error:
exec cell unknown not found

This did not identify the original active cell.

Request

Please expose enough runner diagnostics to debug this condition:

  1. active cell IDs and their state;
  2. the owning task/thread;
  3. cell start time and last activity;
  4. the resource or quota that was exhausted;
  5. a safe stale-cell cleanup or reset action;
  6. a support-facing diagnostic export containing these fields.

No secrets, API keys, dotenv contents, RPC endpoints, or private application data were involved in the reproduction.

View original on GitHub ↗