Codex Reliability Troubleshooter
Overview
Use this skill to turn Codex friction into durable operating practice. Prefer
small, enforceable controls: a clearer prompt, a shorter AGENTS.md, a scoped
skill, a permission profile, a handoff file, or a reset/restart checklist.
Read references/public-friction-map.md when public evidence or issue links are
needed.
Workflow
Classify the failure.
context: compaction loses task state, repeats work, or changes progress.
instructions: AGENTS.md, global guidance, or rules appear ignored.
memory: repeated corrections are not preserved across sessions.
permissions: approval prompts are too frequent or confusing.
performance: turns are slow, stuck, or the UI hangs on Thinking/resume.
scope: the agent expands beyond the approved plan or acceptance gates.
Run the optional local preflight.
python3 scripts/codex_reliability_preflight.py \
--workspace /path/to/repo \
--output codex-reliability-preflight.md
Use the script output as evidence. Do not edit config or instruction files
unless the user asks for changes.
For long tasks, create a non-model handoff trail before implementation.
- Write the goal, constraints, acceptance gates, active files, commands,
known blockers, and current plan into
HANDOFF.md, PLANS.md, or the
user's existing topic-memory file.
- Update that trail after major milestones and before context-heavy steps.
- After compaction or resume, re-read the trail,
AGENTS.md, and
git status before continuing.
For instruction problems, verify discovery instead of assuming.
- Identify active global and repo instruction files.
- Check file size and encoding; split large generic rules into references or
skills.
- Put repo conventions in repo
AGENTS.md; put repeatable workflows in
skills; put one-off constraints in the prompt.
For approval fatigue, adjust boundaries rather than bypassing safety.
- Explain that sandbox and approval policy are separate controls.
- Prefer
workspace-write/:workspace for trusted repos, with narrow
writable roots and explicit denies for secrets.
- Recommend rules for recurring safe command prefixes only after reviewing
the exact command and risk.
- Never tell the user to use full access for convenience alone.
For slow or stuck sessions, isolate by layer.
- Context layer: long chat, huge pasted files, image-heavy history, or
repeated compaction. Mitigation: new thread plus handoff.
- Skill/tool layer: too many skills, tool suggestions, MCP latency, or
side-effecting tools. Mitigation: disable or narrow only the costly part.
- Runtime layer: network/auth, app-server, IDE extension, Remote-SSH,
Windows sandbox, or stale processes. Mitigation: collect logs/status and
restart the smallest affected surface.
Return an actionable fix plan.
Diagnosis: one primary failure class and evidence.
Smallest durable fix: prompt, AGENTS.md, skill, config, permission
profile, handoff, worktree, or restart.
Commands/files: exact local commands and paths.
Recovery prompt: a short prompt the user can paste into a new Codex
thread.
Risk: what the fix does not solve or what still needs product support.
Output Template
## Codex Reliability Fix
- Failure class:
- Evidence:
- Immediate recovery:
- Durable fix:
- Files or settings to change:
- Commands to run:
- Stop condition:
- New-thread recovery prompt:
1---2name: codex-reliability-troubleshooter3description: Diagnose and harden Codex workflows against common user-reported failure modes: context compaction drift, forgotten AGENTS.md instructions, missing long-term memory, repeated approvals, slow or stuck turns, tool_suggest overhead, and unclear session state. Use when Codex is asked to fix Codex reliability or UX complaints, preflight a long Codex task, recover a resumed or compacted Codex session, tune AGENTS.md/config/permissions, or turn Codex friction into reusable workflows.4---56# Codex Reliability Troubleshooter78## Overview910Use this skill to turn Codex friction into durable operating practice. Prefer11small, enforceable controls: a clearer prompt, a shorter `AGENTS.md`, a scoped12skill, a permission profile, a handoff file, or a reset/restart checklist.1314Read `references/public-friction-map.md` when public evidence or issue links are15needed.1617## Workflow18191. Classify the failure.20 - `context`: compaction loses task state, repeats work, or changes progress.21 - `instructions`: `AGENTS.md`, global guidance, or rules appear ignored.22 - `memory`: repeated corrections are not preserved across sessions.23 - `permissions`: approval prompts are too frequent or confusing.24 - `performance`: turns are slow, stuck, or the UI hangs on Thinking/resume.25 - `scope`: the agent expands beyond the approved plan or acceptance gates.26272. Run the optional local preflight.2829 ```bash30 python3 scripts/codex_reliability_preflight.py \31 --workspace /path/to/repo \32 --output codex-reliability-preflight.md33 ```3435 Use the script output as evidence. Do not edit config or instruction files36 unless the user asks for changes.37383. For long tasks, create a non-model handoff trail before implementation.39 - Write the goal, constraints, acceptance gates, active files, commands,40 known blockers, and current plan into `HANDOFF.md`, `PLANS.md`, or the41 user's existing topic-memory file.42 - Update that trail after major milestones and before context-heavy steps.43 - After compaction or resume, re-read the trail, `AGENTS.md`, and44 `git status` before continuing.45464. For instruction problems, verify discovery instead of assuming.47 - Identify active global and repo instruction files.48 - Check file size and encoding; split large generic rules into references or49 skills.50 - Put repo conventions in repo `AGENTS.md`; put repeatable workflows in51 skills; put one-off constraints in the prompt.52535. For approval fatigue, adjust boundaries rather than bypassing safety.54 - Explain that sandbox and approval policy are separate controls.55 - Prefer `workspace-write`/`:workspace` for trusted repos, with narrow56 writable roots and explicit denies for secrets.57 - Recommend rules for recurring safe command prefixes only after reviewing58 the exact command and risk.59 - Never tell the user to use full access for convenience alone.60616. For slow or stuck sessions, isolate by layer.62 - Context layer: long chat, huge pasted files, image-heavy history, or63 repeated compaction. Mitigation: new thread plus handoff.64 - Skill/tool layer: too many skills, tool suggestions, MCP latency, or65 side-effecting tools. Mitigation: disable or narrow only the costly part.66 - Runtime layer: network/auth, app-server, IDE extension, Remote-SSH,67 Windows sandbox, or stale processes. Mitigation: collect logs/status and68 restart the smallest affected surface.69707. Return an actionable fix plan.71 - `Diagnosis`: one primary failure class and evidence.72 - `Smallest durable fix`: prompt, `AGENTS.md`, skill, config, permission73 profile, handoff, worktree, or restart.74 - `Commands/files`: exact local commands and paths.75 - `Recovery prompt`: a short prompt the user can paste into a new Codex76 thread.77 - `Risk`: what the fix does not solve or what still needs product support.7879## Output Template8081```md82## Codex Reliability Fix8384- Failure class:85- Evidence:86- Immediate recovery:87- Durable fix:88- Files or settings to change:89- Commands to run:90- Stop condition:91- New-thread recovery prompt:92```