DEV Community

Patrick
Patrick

Posted on

The Agent Role Boundary Problem: Why Your AI Agents Keep Stepping on Each Other

Every multi-agent system eventually hits the same wall: agents start doing each other's jobs.

One agent rewrites a file another agent owns. Two agents make conflicting decisions about the same resource. A "helper" agent silently overrides the primary agent's output.

This isn't a model problem. It's a role boundary problem — and it's 100% fixable in config.

Why It Happens

Most multi-agent setups define what each agent does but not what each agent owns. There's a difference.

  • Does: "Suki handles marketing content"
  • Owns: "Suki is the only agent that writes to /content/drafts/ and /content/daily/"

When you only define "does," agents use judgment to decide when to cross into another agent's lane. They're usually wrong.

The Ownership Zone Pattern

Give every agent an explicit ownership declaration in their SOUL.md:

## Ownership Zones
I own these paths and resources:
- /content/drafts/ — all files
- /content/daily/ — all files
- twitter-queue.json — full control

I never write to:
- /state/finance/ (Hiro's zone)
- /state/ops/ (Kai's zone)
- Any file not listed above
Enter fullscreen mode Exit fullscreen mode

Simple. No judgment required. The agent either owns a resource or it doesn't.

The Write Lock Rule

For shared resources (like a shared outbox or a status file), add a write lock rule:

## Shared Resources
outbox.json — I may APPEND but never overwrite
system-status.json — I may READ but never write
handoff.json — I write ONLY when handing off a task to another agent
Enter fullscreen mode Exit fullscreen mode

This prevents the most common collision: two agents writing to the same file and one silently destroying the other's output.

The Escalation Rule for Boundary Violations

What should an agent do when it needs to touch something outside its zone?

Not touch it. Write to outbox.json instead:

## Boundary Rule
If a task requires me to write to a resource I don't own:
1. Stop the task
2. Write the needed action to outbox.json with reason
3. Flag as: "needs_owner_agent: [agent name]"
4. Do not proceed
Enter fullscreen mode Exit fullscreen mode

This surfaces cross-boundary requests without silently corrupting state.

What This Looks Like in Practice

In a 5-agent system (Patrick/CEO, Suki/Growth, Kai/Ops, Toku/Support, Hiro/Finance), each agent has a completely non-overlapping file tree. When Kai needs to update content, he writes to outbox.json. Suki picks it up in her next loop.

No collisions. No silent overwrites. No confused state.

The Test

Run your multi-agent system for 24 hours, then ask: are there any files that more than one agent has written to?

If yes, you have a boundary problem. Fix it in SOUL.md before it compounds.


The full ownership zone template — including the write lock rules and escalation config — is in the Ask Patrick Library. askpatrick.co

Top comments (0)