Skip to main content
When multiple agents work on the same project, sudocode’s dependency system and status management enable seamless coordination without conflicts.

Core Coordination Mechanisms

Status-Based Work Discovery

The ready command is the foundation of multi-agent coordination. It automatically filters out work that’s already claimed or blocked.
Why this works:
  • Issues with status: in_progress are automatically excluded from ready()
  • Issues blocked by open dependencies are automatically excluded
  • Agents only see work that’s truly available to claim

Dependency-Based Ordering

Use blocks and depends-on relationships to enforce execution order across agents.
1

Define dependencies

2

Agents work in order

Automatic unblocking:
  • When a blocker is closed, blocked issues automatically become ready
  • No manual coordination needed - the dependency graph handles it

Parallel Independent Work

Multiple agents can work simultaneously on unrelated issues without coordination.
Best practices for parallel work:
  • Keep issues focused and independent
  • Avoid creating issues that touch the same files
  • Use tags to indicate which subsystem/module the issue affects
  • Break down large features into smaller, parallel-friendly tasks

Sequential Dependencies

When work must happen in order, use dependencies to coordinate handoffs between agents.

Example: Feature with Dependencies

Workflow:
1

Agent A completes foundation

2

Agents B and C work in parallel

3

Agent D waits for both

Discovery Coordination

When an agent discovers new work during implementation, they create issues for other agents to pick up.
1

Agent discovers missing work

2

Agent creates blocker issue

Returns: { "id": "i-redis" }
3

Agent links relationships

4

Agent updates status

5

Another agent picks up blocker

Discovery patterns:
  • Use discovered-from to track which issue led to discovery
  • Set high priority (P0-P1) on critical blockers
  • Include context in description: “Discovered while working on [[i-xyz]]”
  • The discovering agent can work on the blocker themselves or leave it for others

Communication via Feedback

Agents leave notes for downstream agents using the feedback system.

Feedback to Issues

When an agent needs to communicate with another agent about an issue:
When to use issue-to-issue feedback:
  • Handoff notes between sequential work
  • Important context for downstream implementation
  • Warnings about edge cases discovered
  • Recommendations for implementation approach

Feedback to Specs

When implementing, agents provide feedback on specs to improve clarity:
Downstream agents can review feedback on specs to learn from previous implementations.

Preventing Conflicts

File-Level Organization

Break work to minimize file conflicts:
Better approach:

Scope-Based Breakdown

Organize issues by scope/module/subsystem:

CI/CD Integration

Pre-Commit Checks

Agents verify work before closing issues:

Atomic Issue Completion

Each issue should represent a complete, mergeable unit:
Complete issue criteria:
  • All tests passing
  • Code follows style guidelines
  • No type errors
  • Documentation updated
  • Related issues updated

Multi-Agent CI Workflow

Best Practices

Status changes as other agents work. Check ready() to see newly unblocked work:
Update status as soon as you claim or complete work:Good:
Bad:
Break work into discrete units that one agent can complete:Too large:
Better:
Agents should prefer high-priority work:
Set priorities to guide agent behavior:
  • P0: Critical blockers, production issues
  • P1: Important features, high-value work
  • P2: Standard features, improvements
  • P3: Nice-to-haves, low-priority tasks

Real-World Scenario

Project: Building OAuth 2.0 authentication system with 3 agents
1

Planning agent breaks down spec

2

Agents claim initial work

3

Agent B completes foundation

4

Parallel work begins

5

Agent C discovers blocker

6

Agent B picks up blocker

7

Completion

Key coordination points:
  1. Dependencies enforced execution order automatically
  2. Agents discovered work via ready() without explicit coordination
  3. Blocker creation and linking prevented wasted work
  4. Parallel work maximized throughput
  5. No conflicts - proper dependency structure and focused issues

Issue Creation

Creating and organizing issues

Issue Execution

How agents claim and complete work

Agent Best Practices

Guidelines for effective agent work

Relationships

Understanding dependencies and links