Skip to main content
AI tutorials

Build Routed Coding Workflows with the Fable Orchestrator

Learn how to install, invoke, test, and safely operate Fable, a local-first Codex routing skill that uses Claude Fable 5.1 for planning and adjudication while delegating implementation to configured GPT-5.6 Luna and DeepSeek V4 Flash agents.

Build Routed Coding Workflows with the Fable Orchestrator

What Fable Does

Fable is a small, local-first routing skill for Codex. It separates planning from implementation: Claude Fable 5.1 plans work and adjudicates decisions, while Codex remains the runtime, controls the workspace, and delegates bounded implementation tasks to OpenCode Go agents.

Normal implementation is assigned to GPT-5.6 Luna. Work involving loops, repeated iteration, or high-throughput implementation is assigned to DeepSeek V4 Flash. Claude Fable 5.1 stays outside the implementation graph and does not write code or own the workspace.

Fable is an orchestration skill, not a standalone model gateway or development dashboard.

Key Features

  • Local-first operation: the skill is installed in a local Codex skills directory.
  • Clear role separation: Fable plans and adjudicates, while Codex executes and verifies work.
  • Bounded delegation: implementation nodes use only the permitted GPT-5.6 Luna or DeepSeek V4 Flash routes.
  • Parallel execution: Codex can start ready workers in parallel when that is useful.
  • Evidence-based verification: Codex collects worker evidence and verifies results before completing the workflow.
  • Fail-safe routing: if neither allowed OpenCode Go route is callable, the workflow reports the blocker rather than substituting an unapproved model.
  • Safe, repeatable installation: the installer supports dry runs, custom targets, and idempotent copying.

Understand the Repository

The repository contains the installable skill, its installer, tests, and an architecture asset:

skill/fable/
├── SKILL.md
├── agents/openai.yaml
└── scripts/ask_fable.sh
assets/fable-orchestrator.svg
install.sh
tests/test_skill.sh

The three files inside skill/fable/ form the installable skill. The ask_fable.sh script is executable and calls Claude Code's local fable alias without session persistence.

Prerequisites

Before installing the skill, configure the callable opencode-go/ and opencode-go-responses/ agents through Codex Router. Fable consumes those agents but does not provide its own proxy, dashboard, model catalog, credential store, or API key.

Restart Codex after changing provider or agent definitions. This ensures that a new task sees the current routing configuration.

Install Fable

1. Preview the installation

From the repository root, run the installer in dry-run mode:

./install.sh --dry-run

This prints the exact destination and copy operations without creating files. Use it to confirm what the installer will do before making changes.

2. Install to the default directory

Copy the skill into the default Codex skills location:

./install.sh --copy

The default destination is ~/.codex/skills/fable. The installer creates only the required directories and is safe to run repeatedly.

3. Select a custom skills directory

Use --target when you want to install somewhere other than the default location:

./install.sh --copy --target "$PWD/.local/codex/skills"

The installer reads only the repository and destination path. It does not read, create, or modify credentials.

Basic Usage

Start a new Codex task, then invoke the skill with an objective:

$fable build the feature

Fable responds with a bounded work graph. Codex validates that graph, launches ready workers in parallel when appropriate, gathers their evidence, and verifies the resulting work. If another planning decision is required, Codex asks Fable to adjudicate.

How routing works

  1. Fable analyzes the objective and produces a bounded plan.
  2. Codex validates the proposed graph before execution.
  3. Normal implementation nodes are routed to GPT-5.6 Luna.
  4. Iteration-heavy or high-throughput implementation nodes are routed to DeepSeek V4 Flash.
  5. Codex collects evidence and verifies the final result.
  6. Fable is consulted again when further adjudication is necessary.

Every implementation node must use one of the two allowed OpenCode Go routes. If neither is available, treat the reported blocker as a configuration issue instead of attempting to bypass the routing policy.

Handle Planning Packets Safely

The packet passed to ask_fable.sh should contain only decisions and workspace facts. Never include credentials, API keys, tokens, or other secrets in a packet.

Because the script calls the local fable alias without session persistence, each request should include the relevant facts needed for that planning or adjudication step.

Test the Installation

Run the repository's dependency-light test suite from the repository root:

tests/test_skill.sh

The test covers:

  • Shell syntax.
  • The source files copied by the installer.
  • Required routing strings.
  • Basic YAML structure.
  • Optional XML validation through xmllint.
  • SVG safety constraints.
  • A dry run using a temporary home directory.
  • An idempotent copy operation.
  • Checks for common credential-shaped strings.

The test does not require PyYAML or a live Claude login, making it suitable for lightweight local validation.

Advanced Operating Tips

Validate routing before debugging the skill

If Fable reports that no allowed implementation route is callable, first check the Codex Router definitions for opencode-go/ and opencode-go-responses/. After changing provider or agent definitions, restart Codex and begin a new task.

Use dry runs for custom deployments

When installing into a project-local or nonstandard skills directory, combine --dry-run with --target before copying:

./install.sh --dry-run --target "$PWD/.local/codex/skills"
./install.sh --copy --target "$PWD/.local/codex/skills"

This lets you inspect the destination and planned file operations before modifying the selected directory.

Re-run installation when updating

Because the copy operation is idempotent, you can safely run it again when refreshing the installed skill from the repository. Follow the copy with tests/test_skill.sh to validate the repository checks.

Keep responsibilities separate

Do not treat Fable as an implementation worker. Its documented responsibilities are planning and final adjudication. Codex retains runtime control, workspace ownership, delegation, evidence collection, and verification.

Conclusion

Fable provides a focused way to add bounded planning and model routing to Codex. Configure the OpenCode Go agents, preview and copy the skill, invoke it with a clear objective, and use the included tests to validate the setup. Keep credentials out of planning packets and restart Codex whenever routing definitions change.