Sync-ManagedDestination and Copy-Directory cut relative paths by the length of $Source. With an 8.3 short path such as JULIAN~1, Get-ChildItem returned long paths, so files landed under a truncated directory name. Both now expand $Source with Get-Item first. PowerShell tests now pass -ExecutionPolicy Bypass, tolerate non-UTF-8 console output, and give the Git Bash quick update 300 seconds. The orchestration rule now covers plugin workflows. A plugin default alone never authorizes subagents, per-task reviews stay proportional, parallel writers get disjoint files, and plugin agents keep to their specialty inside the shared handoff format. doctor warns when an installed Impeccable or Apple Design skill no longer names the commands and sections plugin-workflow relies on. Prompt budget baselines are refreshed to the current values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6.2 KiB
Agent coordination
Ownership and context
The main agent owns the goal, decisions, shared knowledge, and progress. Subagents report to their parent; the parent routes only relevant conclusions, file/symbol references, unresolved risks, and constraints. Direct peer communication needs a concrete dependency and parent coordination; never create a communication mesh or let subagents spawn agents.
Delegate only when correctness, specialization, independence, or parallelism outweighs duplicated context and tool cost. Do cheap exploration directly. Use one implementer for contained work. Parallel roles need independent scopes and materially different value; reviewer plus verifier is not an automatic pair.
Each assignment contains only: concrete task, allowed scope/ownership, success criteria, a few starting references, and the handoff protocol reference. Include relevant constraints and tell workers about concurrent edits. Disable conversation inheritance when supported (for example, choose a fresh context); otherwise keep the explicit prompt minimal and do not claim isolation the client cannot provide. Never preload full conversations, repository summaries, architecture, unrelated files, or earlier agent outputs.
Start at supplied references. Retrieve additional symbols, callers, tests, configuration, or applicable rules only to resolve a concrete question. Reuse reliable findings; reread when code changed or evidence is insufficient. Return unresolved business decisions to the main agent.
Plugin workflows and agents
These rules bound every delegation, including delegation that plugin workflows suggest. A plugin default alone never authorizes subagents. Delegate when the user asks for it, or when the main agent judges under the rules above that independent work outweighs the duplicated context and tool cost.
- Plugin delegation workflows such as Superpowers
subagent-driven-developmentordispatching-parallel-agentskeep their structure, with these limits: one implementer per independent, non-trivial task; trivial tasks stay with the main agent or the same implementer; per-task review is proportional (one combined spec and quality review for risky tasks, self-review otherwise) plus one final review of the whole change. - Parallel writers need disjoint file ownership, stated in each assignment. Never let two writers edit the same files; run overlapping tasks one after another.
- Choose the agent by purpose. Prefer the shared roles:
researcherfor evidence and external sources,architectfor design choices,implementer,reviewer, andverifier. Use a client's built-in read-only search agent for broad location searches that need only a conclusion. Use plugin agents only for their own specialty, such as Impeccable's agents inside an Impeccable workflow or Caveman's crew agents for narrow one- or two-file tasks while Caveman is active. The same ownership, tool limits, and no-spawning rules apply to every agent. - The handoff protocol below is the envelope for every agent. Plugin-specific content, such as a required status line, findings in a plugin's own format, or compressed wording, goes inside its sections. Evidence, paths, commands, and errors stay verbatim.
Handoff
Use these headings; omit empty optional sections:
RESULT
One concise conclusion.
EVIDENCE
Concrete file:symbol references, commands and outcomes, tests, or sources.
CHANGES
Changed files, if any.
RISKS
Only unresolved risks, uncertainty, or assumptions.
NEXT
Only work still required.
Do not repeat the assignment or repository background. Reference code instead of copying it; quote exact code only when needed to explain a defect. Separate conclusions from evidence and confirmed facts from uncertainty. Identify execution versus inspection; never imply an unrun check passed. Include severity and actionable location for review findings.
Review and verification
Reviewer: analytical correctness, regressions, architecture, maintainability, security, and contracts. Start with the actual diff and changed symbols, then necessary direct callers/dependencies and tests. Expand only when correctness depends on interfaces, shared state, configuration, persistence, security boundaries, generated code, or external/public contracts. Never default to full-repository exploration or rerunning the entire test suite.
Verifier: execution evidence against acceptance criteria. Choose relevant tests, builds, checks, generated-output validation, or reproduction steps; do not repeat an architecture review unless execution exposes a design issue. Reuse adequate earlier evidence. Both roles follow proportional verification; neither is mandatory for every change.
Canonical task state
Use task state only for work expected to span multiple hours, compaction, or an interrupted session. For short, bounded work, rely on the conversation and current Git diff/working tree; do not create state just to record routine progress. Task state is a handoff for the active goal, not persistent project memory.
When needed, the main agent maintains one compact state with goal, decisions, changed, verified, open, and risks. Store conclusions and file/symbol references, never transcripts, copied source, secrets, unrelated project knowledge, or narration. Update after material decisions, changes, and verification, before compaction when possible. Mark stale evidence after relevant edits and reset state when starting a different goal.
Use an existing task-state facility when available; otherwise use the workspace's .ai-session/state.json. Keep one active owner per workspace; use separate checkouts for concurrent unrelated tasks. Runtime state is local, not committed. Explicitly share its location when needed; subagents may read it but return updates to the parent instead of maintaining copies. Do not paste the full state into every assignment.
On recovery, verify that the state matches the current workspace and goal, then inspect only unresolved work and changed evidence. Session hooks point to an existing workspace file; they never author decisions or infer completed verification. A pointer is not proof that state is current. Codex follows the same recovery rule manually where lifecycle hooks are unavailable.