orchestrate
Use when running a whole byte-matching decompilation with several AI agents - choosing models, how many agents at once, per-file build budgets, Codex drafts with Claude finishers, the build queue for sandboxed agents, and keeping agents from clobbering each other; with the costs measured on UW2. Also for an armcc5 firmware - a git worktree and a cloned Wine prefix per agent, the full gate before every merge - and for long searches: deadlines, worker and disk budgets, and stopping only the processes and prefixes a run owns.
abedegno · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add abedegno/Exhume --skill orchestrateAbout this skill
name: orchestrate description: Use when running a whole byte-matching decompilation with several AI agents - choosing models, how many agents at once, per-file build budgets, Codex drafts with Claude finishers, the build queue for sandboxed agents, and keeping agents from clobbering each other; with the costs measured on UW2. Also for an armcc5 firmware - a git worktree and a cloned Wine prefix per agent, the full gate before every merge - and for long searches: deadlines, worker and disk budgets, and stopping only the processes and prefixes a run owns.
Orchestrate matching agents
Paths are relative to the Exhume checkout. You (the orchestrator) prepare target tables, hand one file to each agent, review reports, and merge. Agents never merge, commit, or edit shared files.
Pool
- Run about three agents at once. Seven parallel Opus agents exhausted a session's usage limit in a few hours on UW2 and all seven died mid-file. Resume an interrupted agent with SendMessage (it keeps its context, which is cheaper than restarting); do not relaunch it.
- Tell every agent not to spawn sub-agents of its own, never nested agents. The three-agent limit counts every agent running, not just the ones you launched: on UW2 two commenting agents each fanned out to about five sub-agents, twelve ran at once, and the session limit stopped all of them. Restate the rule when resuming, and in every brief, including a port's and a CI's: an agent asked to "do the whole area" is the one most tempted to delegate.
- Use the strongest Claude model as the matcher and finisher. On UW2, Opus averaged about 4 KB of matched code per 170k tokens. Sonnet matched both trial files but used about five times the tokens per byte (seg014, 579 bytes: 185k tokens; seg043, 1.6 KB: 434k tokens, 53 minutes, 218 tool calls).
- Give a big file to one agent, which may fork helpers for single functions: UW2's largest file, ovr110 (20.6 KB, 68 functions), was finished by one Claude agent and seven forks after a Codex draft.
- Give each agent the brief in skills/match-file (C) or skills/match-asm (assembly), plus: its source file name, its segment and table, and a one-line description of what the file does.
Codex
-
Codex's sandbox could not start js-dos's headless browser on UW2; whether it can run emu2 or DOSBox-X is untested. Run the queue outside it:
python3 tools/buildd.py --budget 30(backgrounded; it serves one request per DOS session, as many at once as suit the DOS in use,--jobsto change), and tell Codex to build withtools/remote.sh match src/FILE.Candtools/remote.sh verify src/FILE.C. The queue accepts only those two commands on files in src/. -
Measured on UW2, in input tokens (mostly cached): gpt-6-sol at medium effort, alone, about 1.3M per file of around 1 KB (ovr117: five builds). A cheap draft (gpt-6-luna) finished by sol at medium: 0.9M to 2.0M, average 1.46M over four files, counting luna at 1/20 since sol costs 20 times luna per token. sol at low effort alone: 1.8M to 2.95M. luna alone never finished a file: it quit after one to four builds, or ran away to 10M tokens ignoring caps.
-
Codex stalls on files over about 2 KB and leaves stubs. The pattern that worked: Codex drafts and matches the small functions, a Claude agent finishes the rest (ovr095, ovr097, ovr103, ovr110, ovr166 and others in UW2's history).
-
Codex drafts hide wrong extern names behind masked fixups. The finisher must run verify and use symbols.tsv names; ovr103's draft had about 20 wrong names.
-
Tell Codex explicitly to keep going until WHOLE SEGMENT MATCHES or the budget runs out, and to end with the brief's report including the build count.
-
On a firmware toolchain run under Wine, Codex's default sandbox blocks the local sockets that wineserver and Python's multiprocessing need (
bind: Operation not permitted), so it can edit but never compile or gate. Either start it from the project root with full access (codex -s danger-full-access), or have it edit in small batches logged to a file (build/codex-log.md: file, kind of change, count) and gate and bisect the batches yourself. Its writable root is the directory it starts in: a project outside that directory is read-only to it. -
Codex is good at bulk, low-risk edits that a gate then judges: formatting, renaming locals, one mechanical rewrite applied everywhere. Left alone on a hard matching unit it tends to grind local variant sweeps far past the point of return (see match-file, "When the search stalls").
Handing a run to another agent
When a run stops before its milestone (a usage limit, a change of agent, the owner's request),
write a handover the next agent can trust, in two parts: a portable one in the repository
(the state, what is proved, what is left) and a machine-local, gitignored one (*.local.md:
paths, preserved worktrees, scratch, toolchain locations; never the licence or keys). It names:
- the frozen baseline: commit, the gate command and its last lines, the blob count, so the next agent verifies before it trusts anything;
- every preserved worktree and scratch directory, with the hash of each best draft, and the rule that the next agent reads them and never modifies them;
- per unfinished unit: the best draft, its exact remaining difference, and the controls (what was tried and ruled out, and how many variants), so nothing exhausted is repeated;
- corrections: earlier evidence that turned out wrong (an invalid control, a mistranslated constant), so the next agent does not build on it;
- what is not authorised (push, PR, flashing) and the owner's standing permissions.
Session limits and checkpoints
- A usage limit stops every running agent at once, wherever it is. Plan for it: give each agent a unit of work that can be committed on its own, and commit a checkpoint before starting the next large step (UW2Decomp committed its port's Milestone 5 as a checkpoint, c58e5b7, ninety minutes before it was done, 50459d1). Af