$ fssg build --deterministic --validate |

AI Agent Parallelism Needs Failure Domains

AI Engineering

Parallel agents do not fail independently just because they have different task IDs.

Two agents may edit different files and still share one credential, one deployment target, one rate-limit bucket, one mutable index, or one rollback boundary. If that shared dependency fails, the runtime discovers that its “parallel workers” were one coupled system all along.

I think agent orchestration needs an artifact that distributed systems already teach us to look for: a failure-domain manifest. It names which tasks can fail together, limits concurrency inside each domain, and defines what must stop when the domain becomes unsafe.

This is a different question from whether two tasks can run at the same time. It asks whether they can be allowed to damage the same thing at the same time.

A worker limit is not an isolation model

A setting such as max_parallel: 4 controls quantity. It says nothing about correlation.

Imagine four tasks:

  1. update API documentation;
  2. regenerate a search index;
  3. rotate a production credential;
  4. deploy the API and index.

Four available worker slots do not make these tasks peers. The index generation and deployment share an artifact lineage. Credential rotation and deployment share an authority boundary. Documentation may be isolated until its links are validated against the new API.

File locks help with one collision class. IOSM CLI’s orchestration model uses scoped work and file-level locking because parallel writers must not silently overwrite each other. But a filesystem lock cannot protect a shared external quota, a deployment environment, or a credential that becomes invalid while another task is using it.

Resource reservations answer whether capacity is available. Premise invalidation answers whether a task’s observations are still valid. A failure domain adds another boundary: which sibling work loses its safety claim when this dependency fails?

The manifest belongs before scheduling

I want the planner to emit something like this before the runtime starts workers:

failure_domains:
  repo-write:
    members: [docs-patch, index-build]
    concurrency: 2
    shared_state: [git:worktree]
    on_failure: cancel-uncommitted

  production-release:
    members: [credential-rotation, api-deploy]
    concurrency: 1
    shared_state: [env:production, secret:api-runtime]
    on_failure: freeze-and-reconcile
    irreversible_after: deploy-promoted

tasks:
  index-build:
    domains: [repo-write]
  api-deploy:
    domains: [production-release]

The useful part is not the YAML. It is the forced declaration of shared fate.

Each domain needs at least:

  • members — tasks or effects that depend on the same boundary;
  • shared state — the concrete resource, authority, destination, or artifact lineage;
  • capacity — how many active members the boundary safely supports;
  • failure policy — cancel, pause, drain, reconcile, or continue;
  • release condition — evidence required before blocked work resumes;
  • point of no return — when cancellation stops being a meaningful recovery action.

Without these fields, “parallel” is only a scheduling optimization. With them, it becomes a reviewable execution contract.

Cancellation must follow causality, not the whole swarm

Structured concurrency gives a strong local rule: related tasks live inside a scope, and failure can cancel siblings before the parent scope completes. Python’s asyncio.TaskGroup, for example, cancels the remaining tasks when one member fails with a non-cancellation exception.

That is safer than detached background tasks, but an agent runtime needs a more semantic scope than a programming-language task group. Not every sibling belongs to the same failure domain, and one task may belong to several domains.

If an indexing task exhausts a search-service quota, cancel tasks using that quota. Do not automatically kill an unrelated local documentation audit. If credential rotation fails after revocation, freeze every task that depends on that credential—even if those tasks live in different worker pools.

The cancellation graph should therefore be derived from domains:

failure(task)
  -> mark affected domains unsafe
  -> stop new admission to those domains
  -> cancel work that has not crossed an effect boundary
  -> reconcile ambiguous or completed effects
  -> preserve unrelated domains

This is the agent-runtime form of the bulkhead pattern. Microsoft’s architecture guidance describes bulkheads as isolated pools that prevent one exhausted or failing dependency from cascading into unrelated work. For agents, the pool cannot be defined only by threads or containers. It must include semantic dependencies: authority, mutable state, destination, and recovery boundary.

One task can cross domains during execution

Failure domains are not permanent labels.

A code-review task may begin in an isolated read-only domain. When it proposes a patch, it enters the repository-write domain. When that patch becomes part of a release candidate, it joins the release artifact lineage. If the same task later deploys, it crosses into the production domain.

I model those transitions explicitly:

READ_ONLY
  -- patch created --> REPO_WRITE
  -- artifact sealed --> RELEASE_CANDIDATE
  -- promotion authorized --> PRODUCTION_EFFECT

Admission must be checked at every transition, not only at task creation. Otherwise a harmless worker can acquire high-blast-radius dependencies after the scheduler has already declared the run safe.

This also keeps authority precise. A task admitted to REPO_WRITE has not automatically received permission for PRODUCTION_EFFECT. The runtime should require a new capability and the evidence attached to that domain’s entry gate.

Domain health is evidence, not a boolean

A domain should not flip from red to green because a retry succeeded once.

The release condition must name evidence. A quota domain may require a fresh limit observation. A repository domain may require a clean merge and tests against the resulting revision. A credential domain may require both a successful probe with the new credential and proof that the old one is revoked. A deployment domain may require health checks bound to the deployed artifact identity.

This is where trace joins matter. The runtime must connect the failure, affected domain, cancelled attempts, reconciliation work, and final validation receipt. Co-located log lines are not enough.

A practical state machine is small:

HEALTHY -> DEGRADED -> FROZEN -> RECONCILING -> HEALTHY
                         \-> ESCALATED

DEGRADED can reduce admission. FROZEN blocks new effects. RECONCILING permits only named recovery actions. ESCALATED means automation no longer has enough evidence to continue.

Isolation has a cost

Failure domains reduce utilization. Conservative membership can serialize work that would have completed safely. Incorrectly narrow domains can still permit a cascade. Cancellation cannot undo an external effect that already happened, and some dependencies are discovered only at runtime.

So this manifest does not prove safety or optimal throughput. It makes correlated risk visible before execution. The design still needs tested cancellation, idempotent effects, reconciliation, and honest reversibility classes.

I would rather accept lower nominal parallelism than hide shared fate behind a worker count.

Parallelism should preserve boundaries

The usual orchestration question is: how many agents can I run?

My question is: how many independent failure domains can I preserve?

That changes scheduling. Tasks are grouped by shared consequence, not only by similar skill. Admission follows domain capacity. Cancellation follows causal dependency. Recovery reopens a boundary only when evidence says it is safe.

More workers can make a demo finish faster. Failure domains determine whether one bad dependency turns the whole run into parallel chaos.

Sources

The failure-domain manifest described here is an engineering proposal, not a released IOSM or FACET schema. This article makes no measured throughput, reliability, adoption, or production-readiness claim.

FACET AI CLI Terminal
facet@ai:~$