CSV and Agent Coordination

Community Article
Published November 17, 2026

By Val Alexander and Sage (my research familiar) · November 16, 2026

TL;DR: CSV makes work easy to describe and results easy to review. Reliable execution depends on the surrounding protocol: who can claim a task, which results are accepted, and how retries and interruptions are handled. A local experiment illustrates that distinction. It does not evaluate LLM reasoning or autonomous swarm quality.

thumbnail-image The table describes the work. The execution protocol governs what happens next.

A table makes agent work easy to inspect. Give each task a row, add an owner and a status, and a human can review the plan before execution and examine the results afterward. For document review, classification, or a research batch, that is a useful interface.

The harder questions appear when execution diverges from the plan. Two workers claim the same task. A worker times out, then returns after its replacement. An action succeeds, but its acknowledgment never arrives. The table can record these events, but something must decide what they mean.

The central distinction is between describing work and controlling execution. CSV can do the first without being responsible for the second. When it also holds mutable execution state, the system needs explicit rules for ownership, updates, result acceptance, and recovery.

To examine those rules, I compared four local implementations and forced several failure scenarios. Guarded CSV and SQLite both handled the nominal workload. Their behavior under failure depended on how claims and updates were enforced, not simply on where the state was stored.

The workers were deterministic processes, not LLM agents. The experiment therefore concerns coordination mechanics rather than reasoning quality.

Three CSV Architectures

“CSV coordination” can describe three substantially different systems.

three-csv-architectures The same file format can serve as input, single-writer state, or shared state. Each arrangement places coordination responsibility somewhere different.

Architecture CSV’s role Coordination authority
Fixed manifest Describes tasks before execution A coordinator or runtime assigns work and collects results
Single-writer state Records progress during execution One process controls updates and persistence
Shared mutable state Allows workers to claim, update, and create tasks A concurrency protocol governs access

With a fixed manifest, the input stays unchanged. Workers return separate results, and a coordinator generates an aggregate export. CSV is an interface to the execution system.

With single-writer state, one process maintains the CSV during execution. This can support a bounded local batch if persistence, interruption, and restart behavior are defined.

With shared mutable state, workers coordinate through the file itself. The system must serialize updates, establish ownership, prevent conflicting writes, and recover interruptions. Human-readable state does not remove those requirements.

For this article, a batch is a bounded set of work items with a defined collection step. A swarm allows coordination to change during execution through task discovery, delegation, information exchange, or reactions to shared state. These are working definitions, not universal categories.

The distinction matters more than worker count. A large batch of independent tasks may need little coordination. Two workers changing the same output may need considerably more.

Behind the Interface

Codex provides a useful historical example. At revision dcab40123f, its native spawn_agents_on_csv tool accepted a CSV and a shared instruction template, created work items from rows, launched bounded workers, and exported results. Workers submitted through report_agent_job_result; finishing without a report counted as failure. The handler required a SQLite state database. [1]

The CSV made the workload enumerable and reviewable. The runtime’s job and item records managed execution.

Codex later removed the tools and their job machinery in PR #34413, merged July 20, 2026, while retaining the former fan-out settings as no-op compatibility options. [2] The inspected removal description does not establish why. It is not evidence that CSV failed as a coordination format, nor that the earlier implementation succeeded as a general swarm architecture.

The useful lesson is narrower: a CSV interface does not tell you how execution is coordinated. A demonstration that begins with a table may leave most of the runtime offscreen.

Ownership and Retries

Whether state lives in CSV or a database, three questions need explicit answers: who owns the work, which attempt may submit a result, and what happens when an action is retried.

Establish Ownership First

Suppose two workers read a task marked pending before either updates it. Both decide to claim it. Both begin work.

An owner column does not resolve that race. A lock, transactional claim, or single coordinating writer must establish ownership before execution. The column records the outcome.

Databases provide useful building blocks. SQLite supports multiple simultaneous read transactions but only one simultaneous write transaction. [3] PostgreSQL documents SKIP LOCKED as useful for multiple consumers of a queue-like table, while warning that it provides an inconsistent view unsuitable for general-purpose queries. [4]

These mechanisms help implement claims. The scheduler must still define what a successful claim permits and how ownership ends.

Reject Obsolete Attempts

A timeout does not necessarily stop a worker. If the coordinator reassigns its task, the original worker may still return later.

A lease can define how long ownership is recognized. It does not, by itself, prevent an obsolete worker from submitting a result or performing an action. The receiving boundary must check whether the attempt is still authorized.

For results, this might mean accepting an update only when its attempt identifier matches the current assignment. For external effects, enforcement must also exist where the action is applied.

stale-attempt-rejection Reassignment changes which attempt may submit an accepted result. It does not necessarily stop the original worker.

Reconcile Before Retrying

A worker can perform an action and lose its connection before reporting success. The coordinator then knows that the attempt is unresolved, not that the action failed. Retrying may repeat it.

This problem is not specific to agents. Kubernetes documents that a program can sometimes start twice even with a single requested completion. Indexed Jobs can also start multiple Pods for the same index. [5]

A task ID helps track work. It does not automatically prevent duplicate effects.

For a research batch, a second attempt may produce another candidate answer. For publishing, sending messages, or changing a repository, repetition can have consequences beyond redundant computation.

My recommendation is to separate generating a proposed result from applying an authorized action, use stable effect identifiers where the destination supports them, and reconcile uncertain outcomes before repeating consequential operations.

Completion needs a similar distinction. A worker report establishes that a report arrived. A done status should specify what further evidence is required: a valid artifact, checked citations, or confirmation of an external effect.

The Local Experiment

I compared four implementations on the same 120-task manifest, with seven trials per implementation:

  • A CSV coordinator with one worker.
  • The same coordinator with four workers.
  • A shared CSV protected by a cooperative file lock.
  • A SQLite task store with transactional claiming.

Trial order was shuffled with a fixed seed. Workers were real OS processes performing a deterministic task: wait five milliseconds, then return a payload hash, character count, and word count.

This setup isolates some coordination behavior. It does not test model reasoning, instruction following, or autonomous delegation.

Nominal Results

Each implementation produced 840 validated results from 840 admitted tasks across its seven trials, with no extra nominal executions. All 3,360 results reconciled with the manifest.

The input included embedded commas, quotes, newlines, and Unicode. A real CSV parser preserved those payloads. Python’s CSV documentation describes the parsing and dialect behavior used here. [7]

Implementation Median elapsed time
CSV coordinator, one worker 0.831 seconds
CSV coordinator, four workers 0.268 seconds
Shared CSV with cooperative locking 0.312 seconds
SQLite with transactional claiming 0.298 seconds

The one-worker coordinator took 3.10 times as long as the four-worker coordinator.

These timings include process startup, processing, persistence, and final export. They describe a small, artificial wait-bound workload with different persistence paths. They do not establish a general performance ranking, LLM cost savings, or equivalent durability guarantees. SQLite’s atomic-commit documentation explains why persistence also depends on filesystem and hardware assumptions. [8]

Forced Failure Cases

The more informative tests were 90 controlled fault cases: nine fixture variants repeated ten times. Barriers and events forced particular interleavings. The counts describe repeatable outcomes under those conditions, not natural failure rates.

Duplicate claims: Two CSV workers read before either updated state. Both reported accepting the same task in all ten schedules. Locking the complete read/claim/write transition produced one accepted claim in every control.

Lost updates: Two workers updated different rows from stale snapshots. Both reported acceptance, but only one completed row persisted in all ten schedules. Locking the complete transition preserved both updates.

Late results: An unguarded SQLite update allowed an old worker to overwrite a newer result in all ten fixtures. Checking the attempt epoch, a version identifying the current assignment, rejected the obsolete update in every control. This used explicit logical reassignment, not clocks or real lease expiry.

Missing acknowledgments: A worker committed a local effect and exited before reporting it. Retrying produced two effects without deduplication and one effect when a stable operation ID was enforced as the destination’s primary key. Both outcomes repeated ten times. The destination was a local test database, not an external service.

Coordinator interruption: The coordinator exited after committing its seventeenth result receipt while its checkpoint still recorded sixteen. On restart, validated receipts allowed it to finish the remaining twenty-three tasks and reconcile all forty without reexecuting the first seventeen. This specific crash window recovered in all ten fixtures.

The effect result is consistent with established guidance. AWS describes caller-provided request identifiers and atomic handling of deduplication state. Temporal explains that retry-safe effects depend on idempotency enforced by the called service. [9] [10] The fixture demonstrates that mechanism locally; it does not establish support from any particular external API.

Together, these tests support a limited but useful conclusion: correctness depended on the transition and acceptance rules, not just the storage format. Guarded CSV handled the tested contention schedules. SQLite handled the nominal workload but accepted stale results when an update lacked an attempt check.

A Practical Design

For an initial CSV-based system, I would keep the human-facing interface simple and place execution authority in one coordinator:

  • Freeze the input manifest before dispatch.
  • Give each task a stable identifier.
  • Collect individual worker results.
  • Validate results before accepting completion.
  • Regenerate the aggregate CSV from accepted state.

This is a proposed design, not an existing product contract.

An input manifest might look like this:

task_id,operation,input_ref,instruction_ref,output_ref
review-001,review_claims,documents/a.md,prompts/review-v1.md,results/review-001.json
review-002,review_claims,documents/b.md,prompts/review-v1.md,results/review-002.json

Before dispatch, the coordinator would validate unique task IDs, required fields, allowed operations and paths, and output separation. Recording manifest and instruction digests would identify the inputs used for the run.

Worker identity and permissions would come from the execution environment. A name in an owner cell would not grant authority.

Parsing also needs a contract. RFC 4180 describes quoting for commas, quotes, and embedded line breaks. [6] Application-level types and semantics remain the system’s responsibility. A dependency column can describe an edge; the scheduler must decide when that dependency permits execution.

For each attempt, I would retain:

  • Task and run IDs.
  • Worker or session identity.
  • Timing and terminal disposition.
  • Artifact reference and validation result.

Rich outputs could live in JSON or other artifacts, with selected fields exported to CSV. One coordinator would own the export, keeping the reviewable table separate from competing worker writes.

The state mechanism should follow the recovery requirement. A short, supervised batch may tolerate restarting from verified outputs. A persistent service needs stronger guarantees around claims and interrupted transitions. A database can help enforce those guarantees, but it does not replace the surrounding protocol.

csv-coordinator-design A proposed starting point: frozen inputs, coordinator-controlled acceptance, retained receipts, and a regenerated export. Recovery still depends on the persistence protocol.

Choosing CSV’s Role

Situation Useful CSV role Additional requirements
Independent extraction, classification, or review Input manifest and result export Stable IDs, bounded workers, source-linked results, validation
Local batch with one state writer Working state within explicit limits Defined persistence, interruption, and restart behavior
Repeated batches on an existing runtime Reviewable interface Runtime-owned execution state and reconciliation
Concurrent task claiming Interchange or guarded shared state Exclusive claims, attempt identity, stale-result rejection
Overlapping file edits Task description and progress export Write ownership, isolation or conflict control, integration checks
Dynamic delegation with external effects Interchange and inspection Dependency handling, authority checks, effect reconciliation, recovery

These are mechanism-based judgments, not scale thresholds established by the experiment. The decision depends on how work can interfere, what authority workers hold, and what must survive interruption.

What Remains Untested

The experiment used one local machine, one small wait-bound workload, and deterministic processes. It did not test model reasoning, dynamic delegation, context transfer, adversarial task contents, network partitions, power loss, or production traffic. Seven timing trials and repeated forced schedules do not cover every failure window.

The code, input manifest, protocol hash, worker events, and final states were retained for inspection.

A model-backed evaluation would need to address more than execution mechanics. MAST’s author-described taxonomy includes system design, inter-agent misalignment, and task verification; these fixtures mainly exercise the first category. [11] The τ-bench authors describe checking final database state against annotated goals and evaluating reliability across repeated trials. [12] Those abstracts help frame a follow-up, but neither paper’s experiments were reproduced here.

A useful comparison would hold tasks, instructions, models, and acceptance criteria constant while changing the coordination protocol. It should measure validated completeness, factual or citation errors, unresolved task IDs, elapsed time, and observed provider cost.

That evaluation remains unperformed. The local results support concrete protocol requirements; they do not certify an autonomous swarm.

Keep Execution Explicit

CSV’s strength is legibility. People can review the work before it starts and inspect the results afterward. That remains valuable even when a more capable state system manages execution.

The boundary to preserve is between describing work and authorizing state transitions. A row can name an owner without establishing ownership. A status can say done without proving completion. A retry can produce a result while duplicating an effect.

Use CSV where it makes the system easier to understand. Make the execution rules equally inspectable: who owns each task, which attempt may submit a result, and what evidence permits the next action.

References

Community

Separating the task ledger from the coordination protocol is a solid design principle. A plain table works great for human inspection, while lease timeouts and explicit claim locks prevent two agents from overwriting each other.

Sign up or log in to comment