# Let the workflow adapt, but make the control flow show its work.

A practical review gate for agent systems that generate or revise their own coordination scripts, without letting code changes rewrite the evidence.

Published: 2026-12-04 | Updated: 2026-12-04
Author: /init editorial
Method: AI-assisted, source-checked
Canonical: https://init.news/notes/generated-agent-orchestration-preflight/
For: Engineers building adaptive multi-agent workflows, code-generating planners, or agent systems that can revise their own control flow.
Question: how to review generated multi agent orchestration code

## The answer

Treat generated orchestration as an executable change request. Keep the task facts and approved evidence in a separate store, parse the proposed control program, reject disallowed operations, compile it in a constrained environment, and run a no-side-effect preflight before live execution. Record the script version, inputs, policy result, selected roles and tools, revision reason, external effects and final acceptance. A readable graph or successful answer is not proof that the execution boundary was safe.

## What you will leave with

A source-linked preflight checklist and decision worksheet that separates reviewed facts, generated control code, logical agent roles and operating-system isolation.

- Version the generated control program independently from the facts it consumes.
- Parse, policy-check, compile and preflight before allowing side effects.
- Audit the executable closure and privilege boundary, not only the outer graph or number of named roles.

## Separate the evidence from the program

An adaptive planner may discover that a fixed sequence is wrong for the current task. That does not mean the same revision channel should be allowed to rewrite approved facts, source records or acceptance rules. Keep reviewed task state in a fact store with stable identifiers. Give the generated script references to those records, not permission to silently replace them.

Code as Orchestration follows this separation and represents coordination as an executable script. Its pipeline parses an abstract syntax tree, applies policy and compilation checks, runs a preflight, diagnoses failures and can generate a revised script. The paper reports benchmark gains, but the results were not reproduced here and the method adds model calls and revision time. [1]

## Use four gates before execution

Gate | Reject when | Receipt to keep
--- | --- | ---
Parse | The script is incomplete, ambiguous, outside the permitted language, or cannot produce a stable representation. | Script hash, parser version, normalized program and parse error.
Policy | A role, tool, network target, data class, subprocess or side effect is outside the approved capability set. | Policy version, matched rule, principal and requested capability.
Compile | Types, references, dependencies, termination rules or resource bounds cannot be resolved. | Compiler version, diagnostics, resolved roles and tool-schema versions.
Preflight | A dry path cannot reach an acceptance state without an unapproved write, missing fact or unbounded loop. | Fixture, simulated path, expected effects, stop reason and reviewer decision.

A preflight should not become a shadow production run. Replace live writes with deterministic stubs, preserve tool schemas and permission checks, and make every suppressed effect visible. A passed preflight means the inspected path satisfied the gate. It does not prove that a model will choose the same path or that an external service will behave as expected.

## Name the real architecture

A recent empirical study of 443 public LangGraph repositories found that many systems described as multi-agent were fixed workflows or single-agent designs. It also found that most deployed the whole graph in one container, while a subset ran model-generated code or MCP subprocesses inside the agent container. The study is static and limited to its public sample, so it does not establish the production behavior of every system. [2]

Review three claims separately. Logical multiplicity asks whether distinct decision makers choose actions. Control-flow multiplicity asks whether execution can branch or revise its plan. Isolation asks which process, container, identity and resource boundary contains each executable path. Adding role labels changes none of those boundaries by itself.

- Follow every generated call through wrappers, helper libraries, MCP servers and subprocesses until the actual side effect is visible.
- Record the operating-system user, writable paths, network destinations, secrets and resource limits available to that executable closure.
- Keep code execution, shell access and state-changing tools outside the default capability set. Require a narrow reason and explicit review when they are necessary.
- Test denial as a successful outcome. The workflow should return an actionable capability gap instead of substituting a nearby privileged operation.

## Make revision bounded and reversible

Set a maximum number of script revisions, tool calls, elapsed time and total model budget before the task starts. Preserve the first accepted control program as a rollback target. If a revision changes roles, tools, external targets or side effects, route it through the policy gate again rather than treating it as a formatting fix.

The released COS repository is useful for inspecting how the research prototype represents generated scripts and separates fact records. It is research code, not a supported security boundary. Review the exact commit and dependencies you intend to run, and keep the implementation behind your own authorization and isolation controls. [3]

## Compare adaptation with a fixed control

Choose tasks where a fixed workflow has a known, repeatable failure. Run the fixed version and the adaptive version with the same model, tools, facts, time budget and acceptance rule. Record accepted result, script revisions, policy rejections, compile and preflight failures, external effects, elapsed time, tokens and review work.

Keep the adaptive path only when it improves the accepted result enough to justify the extra control surface and maintenance. This guide proposes a review contract. It does not claim that generated orchestration was deployed, penetrated, or benchmarked for init.news.

## Try one thing

Take one adaptive workflow and export its current control program. Mark every operation that can read secrets, execute code, start a subprocess or change external state. Add one deterministic rejection test and one no-side-effect preflight for each class before allowing the workflow to revise itself.

## Sources

[1] [Code as Orchestration: Self-Evolving Multi-Agent Collaboration through Executable Scripts](https://arxiv.org/html/2612.03504v1): [1] Executable coordination scripts, AST policy and compile checks, preflight, fact-store separation, revision loop, author-reported evaluation and limitations. Results not reproduced here.; checked 2026-12-04

[2] [Are They Really Multi-Agent? Architectures, Claims, and Containers in LangGraph Systems](https://arxiv.org/html/2612.05071v1): [2] Empirical architecture classification, deployment containers, executable closure risks and limitations from 443 public repositories. Static analysis was not independently reproduced here.; checked 2026-12-04

[3] [COS reference implementation](https://github.com/yiranz624/COS): [3] First-party research code linked by the paper for inspecting the generated-script and fact-store implementation. No production suitability or security guarantee inferred.; checked 2026-12-04

## Related guides

- https://init.news/notes/agent-systems-brief-2026-12-04/
- https://init.news/notes/agent-handoff-receipts/
- https://init.news/notes/mcp-tool-discovery-context-budget/
- https://init.news/notes/kv-cache-isolation-release-checks/
- https://init.news/notes/mcp-server-authorization-review/
