interactive-Codex-to-file-based-fallback
Switch from tmux/interactive Codex to file-based Codex -p execution when interactive runs fail with upstream errors or analysis-only stalls, then verify landing from git/GitHub state.
Best use case
interactive-Codex-to-file-based-fallback is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Switch from tmux/interactive Codex to file-based Codex -p execution when interactive runs fail with upstream errors or analysis-only stalls, then verify landing from git/GitHub state.
Teams using interactive-Codex-to-file-based-fallback should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/interactive-claude-to-file-based-fallback/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How interactive-Codex-to-file-based-fallback Compares
| Feature / Agent | interactive-Codex-to-file-based-fallback | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Switch from tmux/interactive Codex to file-based Codex -p execution when interactive runs fail with upstream errors or analysis-only stalls, then verify landing from git/GitHub state.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Interactive Codex to File-Based Fallback ## When to use Use this when: - the user prefers tmux + interactive Codex first - you are executing a plan-approved GitHub issue in `workspace-hub` or a similar repo - interactive Codex repeatedly fails to make write-phase progress - the repo or parent checkout may already be dirty, so you need worktree-safe verification after the run ## Why this exists A recurring failure mode is that interactive Codex works well for planning and approval-safe prep, but can fail during implementation in two different ways: - immediate upstream errors such as `API Error: 500` / `Internal server error` - long context-gathering sessions that never transition into file writes, even after narrower retry prompts In those cases, continuing to retry interactive mode wastes time. The productive move is to switch to file-based `Codex -p` execution with a self-contained prompt, then verify success from actual git/GitHub state. ## Default decision ladder 1. Honor the user's preferred interactive tmux flow first. 2. If the run fails immediately, retry once with a narrower scope or alternate model if appropriate. 3. If the run stalls in analysis mode or fails again, switch to file-based execution. 4. Verify landed state using commit/issue/remote checks instead of trusting runner narration. ## Stall indicators that justify switching Treat these as evidence that interactive mode is not productive for the current issue: - prompt accepted, context loaded, but no file writes after extended monitoring - repeated retries with tests-only or single-file prompts still do not create files - multiple runs show the same pattern of long analysis with no commit activity - the issue is implementation-ready, but only planning/read-only artifacts get produced reliably ## File-based execution pattern Create a self-contained prompt file with: - issue number - approved plan path - review artifact paths - owned paths - forbidden paths - exact validation commands - closeout instructions Run non-interactively: ```bash cd /mnt/local-analysis/workspace-hub PROMPT=$(< docs/reports/<issue>-execution-prompt.md) Codex -p --permission-mode acceptEdits --no-session-persistence --output-format text "$PROMPT" </dev/null | tee /tmp/<issue>-run.log ``` For approval-safe planning/read-only work: ```bash Codex -p --permission-mode plan --no-session-persistence --output-format text "$PROMPT" </dev/null | tee /tmp/<issue>-plan.log ``` ## Verification checklist after file-based execution Always verify all three surfaces: 1. GitHub issue state - `gh issue view <issue> --json state,comments,labels` 2. Commit reality - `git show --stat --name-only <commit>` - ensure the claimed owned files are actually in the commit 3. Remote vs parent-checkout state - `git fetch origin` - confirm whether the commit landed on `origin/main` - separately inspect the user's parent checkout with: - `git status --short` - `git rev-list --left-right --count HEAD...origin/main` Important rule: - remote landed state and parent-checkout sync state are different truths - if the remote landed but the parent checkout is dirty and behind, report that explicitly and do not claim the local repo is fully synced ## Worktree recommendation If the parent checkout is dirty: - execute from a clean issue worktree when possible - do not auto-sync or pull the dirty parent checkout unless the user asks for reconciliation - if needed, inspect/validate the landed commit from the clean worktree or a fresh detached worktree based on `origin/main` ## Reusable example outcome Observed successful pattern: - user preferred interactive tmux + `Codex --dangerously-skip-permissions` - interactive runs repeatedly stalled or failed with upstream errors during implementation - switched to file-based execution for the same approved issue - verified the landed implementation through targeted tests, scheduler validation, generated sample artifacts, and GitHub issue closure - reported separately that `origin/main` had the landed commit while the local parent checkout remained dirty/behind ## Pitfalls - burning multiple extra interactive retries after the same no-write stall pattern is clear - assuming an issue is incomplete just because the parent checkout is behind; first verify remote landing - claiming the local repo is synced when only the side worktree or remote branch is updated - trusting the runner summary without checking the actual commit and issue state
Related Skills
interactive-report-generator
Generate interactive HTML reports with Plotly visualizations from data analysis results. Supports dashboards, charts, and professional styling.
verify-Codex-run-commit-vs-working-tree-before-closing
After a Codex implementation run, verify the claimed file set against the actual commit and working tree before treating the issue as fully complete.
wave-based-parallel-plan-execution
Orchestrate phase execution by discovering dependencies, grouping into waves, spawning subagents, and collecting results with optional wave filtering
multi-file-tax-reconciliation-workflow
Systematic parallel review and reconciliation of multi-document tax filings with cross-reference validation
multi-file-tax-prep-orchestration
Structured approach to complex multi-file tax return preparation with traceability and planning
git-large-file-staging-conflict-recovery
Recover from pre-commit hook blocks on oversized files and corrupted rebase states during bulk repo syncs
freetaxusa-eefile-navigation-pattern
Handling session timeouts and navigating FreeTaxUSA's multi-step e-filing flow to the signature page
extract-skills-from-Codex-sessions
Automatically extract reusable skills from Codex session transcripts using LLM analysis and wire them into a Stop hook
batch-syntax-fix-with-regex-line-based-fallback
Fix repeated syntax errors across many files using regex, then fall back to line-based parsing when regex fails
exclude-wiki-Codex-md-from-harness-line-limit-hook
Fix false-positive pre-commit failures where workspace-hub's AGENTS.md line-limit hook blocks edits to auto-generated wiki schema files under knowledge/wikis/.
preserved-plan-refile-with-attested-review-wave
Reopen a previously closed GitHub issue with a preserved local plan, rewrite it into a conservative draft, and drive iterative attested adversarial review waves until it is truly approval-ready.
planning-lane-cross-review-permission-fallback
Handle overnight planning-only lanes where plan revision/editing works but real cross-provider review dispatch is permission-blocked.