Skip to content

Execution agent

flowchart LR
  Triggers@{ shape: bolt, label: "Triggers" }
  ExecutionAgent["Execution agent"]

  Triggers --triggers--> ExecutionAgent

  class Triggers triggersOrange
  class ExecutionAgent executionBlue

  classDef triggersOrange fill:#ffe8d4,stroke:#d66a28,color:#d66a28
  classDef executionBlue fill:#cfe8ff,stroke:#0366d6,color:#0366d6

The Execution agent reads a task spec and implements the code. It handles two scenarios depending on whether the task has a parent feature: tasks under a feature auto-merge to the feature branch; orphan tasks require human review before merging to main.

Type: LLM (Claude)
Script: .autoducks/agents/execution/pre.sh + post.sh

EventCondition
Issue comment/agents execute on a non-Feature issue
Workflow dispatchissue_number + base_branch (dispatched by the Wave Orchestrator)

An orphan task has no parent feature issue. The PR targets main and requires human review.

Pre-execution
  1. Reacts to the trigger comment with 👀.
  2. BASE_BRANCH defaults to the configured base branch (e.g., main). No feature number is extracted.
  3. Generates a slug from the issue number and title.
  4. Creates a task branch from main: feature/0-issue-{issue_num}-{timestamp}.
  5. Writes the issue spec (title + body) to /tmp/task-spec.md.
LLM execution

The agent reads /tmp/task-spec.md and implements the task using Write, Edit, and Bash (local changes only — no git or API calls).

Post-execution
  1. assert_changes validates the agent produced changes. On failure: notifies and exits with 😕 reaction.
  2. Commits and pushes changes.
  3. Creates a PR targeting main titled Task #N: {title} with body fixes #N.
  4. No auto-merge — PR requires human review.
  5. Reacts with 👍 and posts a comment confirming PR creation.
ScenarioPatternExample
Orphan taskfeature/0-issue-{num}-{timestamp}feature/0-issue-99-1735000000
Feature taskfeature/{feature_num}-issue-{task_num}-{timestamp}feature/42-issue-43-1735000000
permissions:
contents: write
issues: write
pull-requests: write
actions: write
id-token: write

When triggered by a comment, you can override model settings:

/agents execute --model claude-opus-4-7 --reasoning high

When dispatched by the Wave Orchestrator, WORKER_MODEL and WORKER_REASONING are passed as workflow inputs.