codex-fix

Diagnose and repair Codex CLI sandbox and stream disconnection errors.

7|1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/gyy0592/claude-config --skill codex-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-fix
Source: https://github.com/gyy0592/claude-config/tree/main/skills/codex-fix
Command: npx skills add https://github.com/gyy0592/claude-config --skill codex-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a concise diagnostic reference and targeted fixes for failures in the Codex CLI, including bubblewrap (bwrap) sandbox permission errors, stream disconnections, unexpected exits, and behavior differences between codex review and codex exec. It helps developers quickly identify whether failures are caused by sandboxing, environment mappings, large diffs, network/proxy instability, or tmux/session issues and advises minimal, safe corrective actions.

Core Features & Use Cases

  • Sandbox diagnostics: Steps to verify bwrap installation, setuid bit, and subuid/subgid mappings to resolve RTM_NEWADDR and uidmap permission errors.
  • Stream and diff handling: Guidance to retry transient disconnects, determine diff size thresholds, and choose commit-by-commit review or codex exec for large diffs.
  • Fallbacks and verification: Environment variable bypass instructions, tmux cleanup tips, and verification commands to confirm the fix worked.
  • Use Case: When codex review repeatedly fails on a CI or developer machine, use this Skill to determine whether to install/configure bubblewrap, split the review, or switch to codex exec for a stable stream.

Quick Start

Retry the original failing codex command up to three times, then follow the matching diagnostic section below and apply the recommended fix for bwrap, stream, or diff-size issues.

Frequently Asked Questions about codex-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does codex review fail with bubblewrap bwrap sandbox permission errors?

Codex review repeatedly fails with stream disconnections when network or proxy instability disrupts the data stream, or when processing large diffs exceeds size thresholds. Retry the command up to three times, then split the review commit-by-commit or switch to codex exec for a stable stream.

How do I fix codex exec stream disconnections during code review?

Fix codex exec stream disconnections by retrying the failing command up to three times for transient network issues. If large diffs cause the disconnect, determine the diff size threshold and process the review commit-by-commit or switch to codex exec for stable execution.

Can I bypass the bubblewrap sandbox in Codex CLI to run code review?

You can bypass the bubblewrap sandbox in Codex CLI by setting the HUMANIZE_CODEX_BYPASS_SANDBOX environment variable. This bypass option allows codex review and codex exec to run without bwrap sandboxing when permission errors persist, followed by verification commands to confirm the fix.

What is the best way to handle large diffs in codex review that cause unexpected exits?

The best way to handle large diffs in codex review that cause unexpected exits is to split the review commit-by-commit or switch to codex exec. Determine the diff size threshold causing the failure, then apply commit-by-commit review as a workaround for stable stream processing.

How do I clean up tmux sessions that interfere with Codex CLI execution?

Clean up tmux sessions that interfere with Codex CLI execution by applying tmux cleanup tips to remove stale or orphaned sessions. After cleanup, run verification commands to confirm the fix worked and that codex review or codex exec executes without unexpected exits or stream issues.