Skip to content

Codex cannot read sessions: No file descriptors available

Source: Troubleshooting reference

Symptom. Session resume reports thread-store internal error and os error 24. MCP initialization, CA certificate reads, or helper launches may also fail.

Root cause. The app-server has exhausted its per-process soft descriptor limit. Each live MCP child can hold pipe and process-handle descriptors in the parent. A 1,024 limit can be too small for many simultaneously loaded sessions; the transcript itself need not be damaged.

Confirm. Inspect /proc/<daemon-pid>/limits and count entries under /proc/<daemon-pid>/fd. Compare live process handles, pipes, sockets, and files before diagnosing corruption or expired credentials.

Fix. Deploy the shared Linux resource-limit startup policy, start a fresh SSH login, and restart the affected Codex daemon when authorized. Verify its actual soft limit is 65,536 (or the hard cap), then read the affected session and exercise tool execution. Leave the hard limit unchanged. Raising capacity does not repair a missing code-mode-host binary; install the complete matching runtime for that error. Investigate continuing unbounded helper growth separately.