Autonomous Project Management with Subagents

Coordinate projects autonomously: a main agent delegates work to PM subagents that track tasks in a shared STATE.yaml, update it as they progress, pick up unblocked work in parallel, and keep all task state in version-controlled files.

OpenClaw Intermediate Copied: 0
1 resource

Requirements

  • Uses sessions_spawn / sessions_send for subagent management.
  • Requires file system access for STATE.yaml.
  • Git for state versioning (optional but recommended).

How to use

Label conventions matter: use pm-{project}-{scope} for easy tracking.

Core Pattern: STATE.yaml — a project coordination file that records tasks with IDs, statuses, owners, timestamps, notes, blockers, and next actions.

# STATE.yaml - Project coordination file
project: website-redesign
updated: 2026-02-10T14:30:00Z

tasks:
  - id: homepage-hero
    status: in_progress
    owner: pm-frontend
    started: 2026-02-10T12:00:00Z
    notes: "Working on responsive layout"
    
  - id: api-auth
    status: done
    owner: pm-backend
    completed: 2026-02-10T14:00:00Z
    output: "src/api/auth.ts"
    
  - id: content-migration
    status: blocked
    owner: pm-content
    blocked_by: api-auth
    notes: "Waiting for new endpoint schema"

next_actions:
  - "pm-content: Resume migration now that api-auth is done"
  - "pm-frontend: Review hero with design team"

Setup: AGENTS.md Configuration — configure the delegation pattern where the main session acts as coordinator only (0–2 tool calls, spawn/send only), delegates all execution to PM subagents that own their STATE.yaml files, may spawn sub-subagents for parallel subtasks, and have all state changes committed to git.

## PM Delegation Pattern

Main session = coordinator ONLY. All execution goes to subagents.

Workflow:
1. New task arrives
2. Check PROJECT_REGISTRY.md for existing PM
3. If PM exists → sessions_send(label="pm-xxx", message="[task]")
4. If new project → sessions_spawn(label="pm-xxx", task="[task]")
5. PM executes, updates STATE.yaml, reports back
6. Main agent summarizes to user

Rules:
- Main session: 0-2 tool calls max (spawn/send only)
- PMs own their STATE.yaml files
- PMs can spawn sub-subagents for parallel subtasks
- All state changes committed to git

Example: Spawning a PM — for a task like refactoring the auth module and updating docs, the main agent checks the registry, spawns a PM subagent with a label and task that tracks work in STATE.yaml, and the PM creates the state file, works through tasks updating status, commits changes, and reports back.

User: "Refactor the auth module and update the docs"

Main agent:
1. Checks registry → no active pm-auth
2. Spawns: sessions_spawn(
     label="pm-auth-refactor",
     task="Refactor auth module, update docs. Track in STATE.yaml"
   )
3. Responds: "Spawned pm-auth-refactor. I'll report back when done."

PM subagent:
1. Creates STATE.yaml with task breakdown
2. Works through tasks, updating status
3. Commits changes
4. Reports completion to main

Links

Source: hesamsheikh/awesome-openclaw-usecases and its contributors. License: MIT.

Copyright (c) 2026

Translation and editorial adaptation by ClawCases.

>Resources

>Related Use Cases

>More at this level: Intermediate