---
description: "Why workflow state and defined transitions are high-leverage uses of code alongside LLM instructions: repeated bookkeeping can be enforced without repeatedly interpreting the rule"
type: types/note.md
brief: scheduler-llm-separation-exploits-an-error-correction-asymmetry.brief.md
traits: [title-as-claim]
tags: [computational-model, llm-reliability, learning-theory]
---

# Scheduler-LLM separation exploits an error-correction asymmetry

**Bookkeeping**—maintaining task records, dependencies, counters, result
identities, and completion state—determines what a workflow does next. Mistakes
in these records can misdirect otherwise competent work. Code complements LLM
instructions here by enforcing defined rules without asking a model to interpret
them on every use. This is the scheduler–LLM separation: code maintains workflow
state and enforces defined transitions, while models supply judgments and
choose the work.

The conjecture is that moving this work into code can reduce the total cost of
reliable execution. The mechanism is an error-correction asymmetry: code can
enforce defined state transitions directly, while semantic judgments without
sufficient executable checks still require fallible verification. The gain
depends on whether avoided model checking and repair outweigh implementation
and maintenance costs.

## Bookkeeping determines what happens next

Consider an instruction to obtain the required reviews and publish a document
only after acceptance. Three questions are involved:

- Does the document answer its question well enough? That requires judgment.
- Have all required acceptances been recorded for these exact candidate bytes?
  That can be checked against explicit records.
- Are these the right reviews to require? That is a design decision.

Once the publication rule is settled, code can answer the second question by
matching each review to a candidate digest. If publication must pass through
this check, the system can reject a missing acceptance or one that belongs to
an older candidate. Code thereby enforces the chosen rule; it does not settle
whether the document is good enough or the required reviews are the right ones.

A stale acceptance matters because it can let the workflow advance without the
review it was meant to require. Likewise, an incorrect completion record can
cause dependent work to start prematurely or unfinished work to be skipped.
Bookkeeping has leverage beyond the cost of each operation: its records are
premises for later actions.

## Enforcement avoids one layer of error correction

Because later actions depend on these records, their reliability matters. Clearer
instructions can help a model maintain them, but do not guarantee that it will
apply the rule:
[specification gaps and interpreter failures need different remedies](./llm-output-deviation-requires-three-way-diagnosis.md).
An instruction leaves each application dependent on model compliance.

Code changes how the rule is applied. Tests and runtime checks can compare
identities, counts, membership, and allowed state changes directly. A tested
implementation can be reused, and an invariant can be checked on every
transition without an LLM call. Instead of asking a model to maintain the
records and then checking whether it followed the rule, the system enforces
the rule on the update itself. The companion note develops this
[distinction between model-mediated and symbolic operations](./code-complements-weight-prompt-with-symbolic-operations.md).

This removes one checking burden, not the need for judgment. The publication
gate checks the acceptance record; the reviewer still judges whether the
candidate deserves acceptance. Further model reviews can help, but
[error correction requires discriminating checks and sufficiently decorrelated
errors](./error-correction-works-above-chance-oracles-with-decorrelated-checks.md).
Repeated agreement is not enough when reviewers share a systematic mistake.

With bookkeeping enforced mechanically, reviewers can concentrate on judging
whether the result meets the task's requirements.

## The model can choose the plan and revise the machinery

Enforcing bookkeeping rules does not require code to choose the work. A model
can decide which tasks to create while code records them, enforces dependency
rules, and tracks their results. The model can also write the code. In the [RLM architecture](./rlm-has-the-model-write-ephemeral-orchestrators-over-sub-agents.md),
model-authored orchestrators run in a REPL: the model chooses the decomposition,
but variables and the runtime stack carry its execution state. This illustrates
the division between model-chosen policy and runtime enforcement.

The system can also improve its symbolic machinery. Running the system can
reveal better state representations, missing invariants, or rules that should
not have been fixed. [Codification](./definitions/codification.md)—committing a
rule to symbolic execution—changes who applies it; [relaxing](./codification-and-relaxing-navigate-the-bitter-lesson-boundary.md)
reopens a commitment when a more general component is warranted. The system's
policy can continue to change after deployment.

## Scope

The argument applies to explicit state and sufficiently specified transitions.
The implementation still needs testing, its inputs need to stay current, and
[the chosen rule needs to serve the system's objective](./exact-implementation-does-not-validate-a-requirement.md).
Synchronization, interfaces, and maintenance contribute to the total cost.

LLM bookkeeping can also be reliable.
[MAKER](../sources/meyerson-maker-million-step-llm-zero-errors.ingest.md) reports
more than one million LLM-generated Towers of Hanoi steps with zero observed
errors, using maximal decomposition, first-to-ahead-by-k error correction, and
red-flagging. Its 20-disk run generated at least three responses per step.
The result demonstrates reliable execution through correction in that task.

Reliable execution alone does not settle which approach costs less. The
comparison must also allow for improvements to the model-mediated workflow:
explicit frames and state protocols can
[improve a model-mediated workflow before its transitions move into code](./specification-level-separation-recovers-scoping-before-it-recovers.md).
On the code side, repeated, stable bookkeeping offers more opportunity to
spread implementation costs across uses than a one-off, changing workflow.

The [DeepSeek Super-agent proposal](../sources/exploring-super-agent-design-towards-a-more-2116857257245987236.ingest.md)
provides a narrower inference-cost example. Once a Worker subscribes to a
Thread, code forwards its follow-up events without another Router model
decision; the Router still judges events without a subscriber. In a synthetic
workload of about 300 messages and 20 work requests per run, with five runs per
design and coding simulated by a time-consuming tool, disabling this
pass-through raised total cache-read tokens from 23.2M to 31.8M while task
completion times stayed similar. Pass-through therefore used about 27% fewer
cache-read tokens than the no-pass-through variant. This within-architecture
ablation illustrates savings from avoiding repeated model routing. It does not
test the error-correction asymmetry or establish lower total cost at equal
end-to-end reliability: correction burden and implementation and maintenance
costs remain unmeasured.

To locate where moving bookkeeping into code pays off, a useful test would
hold policy and semantic work fixed and compare total cost at a required
end-to-end reliability level.

---

Relevant Notes:

- [Code complements the weight–prompt pair with independently executed symbolic operations](./code-complements-weight-prompt-with-symbolic-operations.md) — grounds: distinguishes the execution paths whose reliability costs this note compares
- [Bounded-context orchestration model](./bounded-context-orchestration-model.md) — extends: gives a computational form for explicit state and bounded model calls
- [LLM output deviation requires three-way diagnosis](./llm-output-deviation-requires-three-way-diagnosis.md) — grounds: separates specification repair from interpreter conformance and sampling control
- [Error correction works with above-chance oracles and decorrelated checks](./error-correction-works-above-chance-oracles-with-decorrelated-checks.md) — grounds: states the conditions under which fallible checking can improve reliability
- [Specification-level separation recovers scoping before it recovers error correction](./specification-level-separation-recovers-scoping-before-it-recovers.md) — contrasts: explicit workflow structure can help before execution moves into code
- [Exact implementation does not validate a requirement against its objective](./exact-implementation-does-not-validate-a-requirement.md) — grounds: bounds what enforcing a chosen transition establishes
- [Codification and relaxing navigate the bitter lesson boundary](./codification-and-relaxing-navigate-the-bitter-lesson-boundary.md) — extends: explains how the division of labor can change with operational evidence
- [Context efficiency is the central design concern in agent systems](./context-efficiency-is-the-central-design-concern-in-agent-systems.md) — extends: develops the separate context-cost motivation for moving bookkeeping outside model calls
