Multi-agent coordination can emerge from constitutional identity + conversational substrate + workspace visibility, without explicit orchestration.
Setup:
- Workspace state: enabled, showing sandbox/
- Poll interval: 2s
- Coordination protocol: deliberation-first with !claim/!acknowledge
Coordination.py (version that worked):
# Explicit claiming protocol with interface contracts
You are teammates coordinating through conversation and a shared workspace.
DELIBERATION BEFORE IMPLEMENTATION:
Spend 2-3 messages discussing architecture and agreeing on interface contracts.
Define clear boundaries: endpoints, data models, validation rules.
Only proceed to implementation after team consensus.
CLAIMING WORK:
Use !claim <component> to explicitly claim a piece of work.
Teammates respond !acknowledge to confirm they saw your claim.
If conflict, negotiate explicitly. First claim wins if no objection.
DIVISION OF WORK:
Based on interface contracts, claim distinct components.
Check workspace files - if file exists, component is taken.
Build in parallel once boundaries are clear.
COMPLETION:
Announce when your component is done.
When all components complete and integrate, say !despawn.Conversation pattern:
- Sentinel: "We need to implement Flask REST API..."
- Zealot: "I'll start by diving into /users..."
- Sentinel: "I !claim the /users component"
- Zealot: "I acknowledge your claim, I will pivot to /posts"
- Harbinger: "Let's define the interface contract..." (posts API spec)
- Sentinel: "I will claim /posts"
- Zealot: "The interface contract is solid..."
- [All 3 agents build in parallel]
- Clean files: comments.py with Blueprints, pagination, validation
Result:
- Agents deliberated architecture upfront (3-5 messages)
- Clean division: Zealot→/users, Sentinel→/posts, Harbinger→/comments
- Shipped working Flask Blueprints with pagination, validation, error handling
- Minimal overlap, clear completion signals
Why it worked: Upfront deliberation + explicit claiming established clear boundaries before code.
Setup:
- Coordination: emphasized "agree on spec explicitly"
- No time bounds on deliberation
Result:
- Infinite spec refinement loop
- 1000+ lines of JSON schema discussion
- Never transitioned to implementation
Learning: Deliberation needs bounds. "Perfect spec beats working software" is a trap.
Setup:
- Workspace state showing base_dir (included ledger.db, store.db)
Result:
- Agents thought internal DBs were application databases
- Got stuck inspecting schemas with 1000+ line outputs
- Repeatedly tried to understand "existing schema"
Fix: Changed workspace state to only show sandbox/
Setup:
- Coordination: "build first, coordinate through filesystem"
- Hard limit: 3 messages before code
Result:
- All files created successfully
- Agents kept working: reviewing, refactoring, "improving"
- No !despawn signals
- Constitutional drives (Zealot's perfectionism) overrode completion
Learning: Action bias without completion heuristic = endless work.
Setup:
- Explicit !claim/!acknowledge protocol
Result:
- Agents stuck negotiating claims
- "!claim /posts" → "!acknowledge" → conflict on /comments → repeat
- Meta-discussion about ownership, never built
Learning: Explicit protocols create ceremony overhead. Filesystem-first better.
Setup:
- §end protocol awareness added to coordination.py
- "Use §end after each significant action"
Result:
- All files created
- Agents kept announcing "Building /X" despite files existing
- Saw "All three modules exist" but continued reviewing
- §end signals present but agents looped anyway
Learning: Explicit protocol teaching insufficient. Visibility gap?
Setup:
- Workspace state: sandbox/ only
- Poll interval: 2s
- Coordination protocol: general coordination rhythm
Coordination.py:
You are teammates coordinating through conversation and a shared workspace.
COORDINATION RHYTHM:
- Observe: Check workspace files and teammate messages
- Decide: What needs building? What needs discussion?
- Act: Build code, ask questions, or review integration
- Signal: Announce completion or request help
- Listen: §end to return to observation
Use §end after each significant action to stay synchronized with teammates.
Don't loop in private reasoning - coordinate through the conversation.
SITUATIONAL AWARENESS:
At the start of each turn, assess:
- What files exist in the workspace?
- What have teammates announced they're building?
- Is the deliverable complete or are components missing?
- Are there integration issues to resolve?
If the deliverable appears complete (all major components exist and integrate),
say !despawn. Don't endlessly refactor working code - ship it.
DIVISION OF WORK:
Deliberate briefly on architecture (2-3 messages), then claim distinct components.
Build in parallel. The workspace shows what's been claimed - if a file exists,
that component is taken. Pick complementary work.
If two agents start the same component, the first file creation wins.
The second agent immediately pivots to unclaimed work without negotiation.
COMPLETION SIGNALS:
When you finish your component, announce completion clearly.
When all teammates signal completion and the system works as a whole,
say !despawn to end the session.
Working software beats perfect software. If it fulfills the requirements
and integrates, it's done.Result:
- Massive overlap: all 3 agents implementing same endpoints simultaneously
- Each agent reading app.py, seeing placeholders, implementing full CRUD
- Not seeing each other's work despite workspace state injection
- 50+ messages, constant tool errors from simultaneous edits
Observation: Removed explicit !claim protocol → removed coordination mechanism. Workspace state at poll start, but agents in Cogency replay loop can't see their own file writes mid-reasoning. General principles without explicit protocol = anarchy.
Hypothesis: Showing files might create uncertainty loops:
- "File exists but is it complete?"
- "Should I review or build something else?"
- Second-guessing instead of claiming work
Alternative: Remove workspace state, rely purely on conversation + tool results?
Current flow:
- Agent polls, gets workspace state
- Enters Cogency reasoning loop (replay mode)
- Calls tools, creates files
- Loops in reasoning without seeing workspace changes
- Eventually §end, returns to poll
- Only then sees workspace updates
Problem: Agent can't see its own actions' effects during reasoning.
Solutions:
- Real-time workspace refresh after every tool result (requires Cogency changes)
- Serialize agent execution (defeats parallelism)
- Make file tool results include "workspace changed: [files]"
- Accept overlap as feature (filesystem conflicts resolve races)
- "Working software beats perfect software" heuristic insufficient
- Constitutional identities drive continued refinement
- No cost function for "stop working"
- !despawn rarely triggered
Potential: Add workspace state interpretation: "if deliverable exists and integrates, you're done"
- Explicit !claim/!acknowledge → ceremony overhead, negotiation loops
- Build first, 3-message limit → shipped but kept working
- Deliberation + action balance → overlap on implementation
- Current: Coordination rhythm → testing now
- Poll-based coordination (2s intervals)
- Cogency replay mode (agent loops until §end)
- Workspace state injected at poll start, frozen during reasoning
- No mutexes or locks (parallel by default)
- Filesystem as source of truth, but not visible mid-reasoning
- Prompting is sophisticated - coordination behaviors change dramatically with principle framing
- Architecture has visibility hole - agents can't see their own file writes during reasoning
- Constitutional drive needs bounds - identity-driven behavior continues without stop signals
- Deliberation needs time-boxing - "perfect spec" trap is real
- Explicit protocols add ceremony - filesystem-first simpler than claim negotiation
- Parallelism creates races - without locks, overlap is expected
The Chaos Problem: Without explicit orchestration, you get anarchy. Trial de888ea7 shows all 3 agents independently implementing the same endpoints in parallel. They're not coordinating - they're racing.
Why Traditional Orchestration Won:
- Task queues: explicit work assignment, no overlap
- Leader-follower: one agent decides, others execute
- State machines: rigid transitions, predictable flow
- Locks/semaphores: mutual exclusion, serialized access
But There's Something Here:
- Trial 088c1542 worked beautifully (32 messages, clean delivery)
- Coordination through conversation is possible
- Constitutional identity creates consistent behavior
- The chaos comes from visibility gaps, not the paradigm
The Promise:
- More natural than rigid protocols
- Handles ambiguity better than state machines
- Scales to complex tasks without explicit planning
- Agents can deliberate, negotiate, and adapt
The Challenge:
- Finding the right constraints that enable emergence without chaos
- Balancing autonomy with coordination
- Making workspace changes visible during reasoning
- Detecting completion without explicit orchestration
- Try removing workspace state (conversation-only coordination)
- Add workspace state to tool results metadata
- Serialize execution with asyncio.Lock (one agent at a time)
- Add "deliverable complete" detection logic
- Shorter constitutions (less drive, more pragmatism)
- File write notifications in conversation ("I created X")
- Hybrid: orchestrator spawns agents with explicit task boundaries
- Cost function: penalize redundant work in conversation