Skip to content

Instantly share code, notes, and snippets.

@christophermark
christophermark / fable_delegation.md
Last active July 9, 2026 16:04
Fable Delegation

Update (2026-07-09, second revision): After a live six-lane shakedown, File 4's Explore prompt now ends with an explicit report-back rule — a background Explore was observed completing its search but going idle without delivering its brief until nudged via SendMessage.

Update (2026-07-09): Added File 4, an Explore override pinned to Sonnet. Since Claude Code v2.1.198 the built-in Explore agent inherits the main session's model (capped at Opus) — so on a premium main-loop model, codebase exploration silently runs at premium prices unless overridden. Sonnet rather than Haiku is deliberate: exploration results are navigation ground truth for the orchestrator, and a smaller model's silent false negatives ("no other call sites exist") are exactly the failure mode that degrades the main thread. A fuller successor setup (adds a fresh-context verifier, persistent agent memory, and a hardened Codex bridge) lives at https://gist.github.com/christophermark/50e0487fce92d7de176bdc8bb5c8ea5e

Set up my pe

@christophermark
christophermark / codex_delegation_claude_code.md
Last active July 9, 2026 16:12
Codex Delegation - Claude Code
> **Update (2026-07-09, second revision):** After a live delegation shakedown, the wrapper now emits a one-line provenance record (`codex-delegate: mode=… model=… effort=…`) to stderr on success — falling back to the `~/.codex/config.toml` default when `--model` isn't passed — so the orchestrator can attribute results to the model actually used without reading the Codex config. The embedded wrapper below has also been synced wholesale to the successor's current revision — adding the `--network` flag for write mode and hardened argument parsing (a missing option value now prints usage instead of dying silently) — so installing from this gist yields the same script as the successor plan.
>
> **Update (2026-07-09):** Fixed for how non-interactive `codex exec` actually behaves (verified against codex-cli 0.142.5): write mode previously used `approval_policy="on-request"` plus `approvals_reviewer="auto_review"`, but non-interactive runs have no surface to answer approval prompts (requests fail) and `approva
@christophermark
christophermark / task-delegation-system.md
Last active July 17, 2026 16:08
Claude Code task delegation system — Fable orchestrator routing to Sonnet subagents + Codex CLI

Claude Code Task Delegation System — Implementation Plan

Audience: an implementing agent (Claude Code or similar) running on any machine. Goal: set up a delegation system for Claude Code where a premium main-loop model (Fable 5 / Opus) acts as orchestrator and routes work to cheaper Claude subagents and to the Codex CLI — expanding the main thread's capability by keeping bulk tool output out of its context window, not by dumbing it down.

Verified against: Claude Code v2.1.205 and Codex CLI v0.142.5 on macOS, July 2026. Every codex exec flag and config key used here was checked against the