Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:20000419 Fauxnix Atomic Batch Execution

From Leeroopedia
Knowledge Sources
Domains Batch_Execution, MCP, Atomicity
Last Updated 2026-10-26 00:00 GMT

Overview

A batch execution technique that compiles all steps up front (parse + translate in pure mode), then runs them serially in a single session turn with shared timeout and output budgets, so no run/reset/dispose can interleave between steps.

Description

Atomic Batch Execution lets an agent submit a preplanned multi-step workflow in one MCP round trip. All steps are compiled (parsed and translated in PURE_TRANSLATION mode) before any step runs — a compile error in step N stops the whole batch before step 1 begins. Execution then proceeds serially in the same persistent session: later steps see cwd, env, and files from earlier steps. The timeout and output budgets apply to the complete batch, not per step. By default the batch stops after the first nonzero exit (stopOnError=true), but this can be disabled for workflows where later steps should run regardless. The result reports each step separately with a status (completed/failed/timed_out/cancelled/infrastructure_error) and a batch-level stopReason.

Usage

Use this principle when two or more commands or verification steps are already known and do not require model interpretation of intermediate output. It reduces MCP round trips and latency. Use separate single calls only when the next command depends on reading the previous output.

Theoretical Basis

[compile phase]  for each step: plans[i] = translate(parse(step.cmd), PURE)
[execute phase]  for each plans[i]: result[i] = runPlans(plans[i], session, remainingBudgets)
                 if stopOnError and result.exitCode != 0: stopReason = 'command_failed'; break
                 subtract stdout/stderr bytes from remaining budgets
[return]         { results: ExecResult[], stopReason }

The lifecycle lock ensures no run/reset/dispose interleaves between steps.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment