executor-fallback
Skill4 starsChanged 4 days agoMITView on GitHub
Keep a codex-flow run alive when Codex cannot execute — outage triggers, the single explicit AskUserQuestion switch at a task boundary, STATE.md and Decision-log recording, Phase 4 and Phase 5 with Claude as executor plus an independent subagent review, returning to Codex, and the fast-path small-change lane under fallback.
In this repository76 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accounting-bookkeepingSkill
- agent-context-persistenceSkill
- asoSkill
- brainstorm-argumentationSkill
- brainstorm-debateSkill
- brainstorm-lensesSkill
- causal-inferenceSkill
- context-disciplineSkill
- creative-briefSkill
- customer-support-opsSkill
- data-quality-checksSkill
- design-fundamentalsSkill
- ecommerce-operationsSkill
- event-taxonomySkill
- exec-coding-standardsSkill
- exec-cppSkill
- exec-csharpSkill
- exec-deliverableSkill
- exec-github-actionsSkill
- exec-goSkill
- exec-jvmSkill
- exec-phpSkill
- exec-pythonSkill
- exec-rubySkill
- exec-rustSkill
- exec-self-testingSkill
- exec-swiftSkill
- exec-typescriptSkill
- exec-visualizationSkill
- fast-pathSkill
- final-reviewSkill
- financial-auditSkill
- hr-recruitingSkill
- influencer-strategySkill
- interview-ask-backSkill
- interview-elicitationSkill
- jev-assistSkill
- json-data-wranglingSkill
- legal-contract-basicsSkill
- localization-copySkill
- manufacturing-ops-planningSkill
- marketing-attributionSkill
- media-planningSkill
- okr-planningSkill
- pack-game-analyticsSkill
- parallel-executionSkill
- performance-marketingSkill
- personal-financeSkill
- plan-architectureSkill
- plan-backlogSkill
- plan-research-firstSkill
- preflightSkill
- profile-contentSkill
- profile-designSkill
- profile-pilotSkill
- profile-planSkill
- real-estate-analysisSkill
- review-conformanceSkill
- review-dualSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Run your own conformance → quality → security pass as usual, then apply the review-dual comparison protocol to the two reviews.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Executor fallback — Claude executes when Codex is unavailable
Codex is the default executor. When it cannot run, the flow does not die: the user chooses once, explicitly, between fixing Codex and letting Claude execute. The planning, approval, review, and reporting contract stays identical; only WHO writes the code changes.
Triggers (any one):
- Phase 0:
mcp__codex__codex_healthtool call fails, the server is missing,loggedIn: false, or the deep call'sexecProbeisquota,model, orerror. - Mid-run: a
codex_execute/codex_continue/codex_reviewreturnsfailedorabortedwith nosessionId, or itserrors/stderrindicate authentication, quota exhaustion, or an unreachable service. No health re-check is required: anexecProbeofquotaormodel, or a run error carrying those signatures, is sufficient on its own to open the fallback decision. - Mid-run: the same task exhausts bounded auto-resume twice in a row (
attempts/resumeReasons).
Decision — use AskUserQuestion exactly once per outage with two options: Fix Codex and re-check (recommended when the user can log in or restore service now) or Continue with Claude as executor. Never switch executors silently, and never switch mid-task: finish or reset the current task first (per the preflight in-progress reconciliation), then switch at the task boundary.
Recording — STATE.md carries executor: codex by default. On fallback set
executor: claude (fallback: <not-logged-in | server-missing | codex-unavailable> <ISO 8601>);
on return set executor: codex (restored <ISO 8601>). Record each switch once in PLAN.md's
Decision log using the non-task event-block schema from codex-flow:plan-architecture.
Phase 4 under fallback — for each task in dependency order, sequential mode only:
- Generate and read the task's
.codex-flow/CONTEXT-T<n>.mdslice exactly as for Codex, and apply the loadedexec-coding-standards,exec-self-testing, language, deliverable, and distilled domain-skill blocks to your own work — they bind Claude the same way they bind Codex. - Perform the same durable pre-launch writes, but write
- Session: claude-fallback (base: <short sha>). - Implement ONLY this task, within its
Files:scope. Run the task's acceptance command yourself and record- Verification: <command> → exit <code>in the task's report entry; this replaces the server-sideverificationfield. - Parallel worktree mode is not available under fallback; when
task-wavesreports width > 1, still run sequentially and note it in the Decision log.
Phase 5 under fallback — Claude must not grade its own homework alone:
- Replace
mcp__codex__codex_reviewwith an independent review by a fresh subagent (a code-review agent, or a general-purpose agent with the review skills), given the same focus block fromcodex-flow:review-dual(task id, acceptance criteria,Files:list, review order). - Run your own conformance → quality → security pass as usual, then apply the review-dual comparison protocol to the two reviews.
- Fix verified CRITICAL/HIGH findings directly (there is no Codex session to route them to), re-run the task's acceptance checks after every round; the full suite runs once in the whole-feature review. Keep the 3-round cap; after 3 rounds, stop and re-plan the task with the user.
- Report PIC for a fallback task is
claude (fallback: <reason>)percodex-flow:session-report;cost.mdreports measured Codex cost for the run's Codex tasks only and says so.
Returning to Codex — at any task boundary, when the user says Codex is available again, re-run
mcp__codex__codex_health with { deep: true }; on loggedIn: true with execProbe: ok restore executor: codex (restored <ISO 8601>) and
run the remaining tasks through Codex normally. Tasks completed under fallback keep their
claude-fallback Session line and are never re-executed.
Fast-path small-change lane under fallback — allowed: Claude implements the ≤ 2 files itself
under the same embedded blocks, runs the lane's known-red comparison, and gets the independent
subagent review in place of the skipped codex_review. Log session=claude-fallback in
fastpath.log.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

