# Why Manual workflow_dispatch Runs Bypass the Open-PR Bound Check in Design-Control-Loop Phase G

> Learn why manual workflow_dispatch runs bypass open-PR bound checks in Design-Control-Loop Phase G. Developers gain override control while automated safety limits remain for scheduled runs.

- Repository: [HumanLayer/skills](https://github.com/humanlayer/skills)
- Tags: internals
- Published: 2026-09-13

---

**Manual `workflow_dispatch` executions intentionally skip the open-PR bound verification to give developers explicit override capability while maintaining automated safety limits for scheduled runs.**

The **design-control-loop** skill in the `humanlayer/skills` repository implements a multi-phase execution model that safeguards against uncontrolled pull request proliferation. During **Phase G**, the system evaluates an *open-PR bound* that caps concurrent PRs for automated runs, yet this check is deliberately omitted when workflows are triggered manually via `workflow_dispatch`.

## Understanding the Open-PR Bound in Phase G

The design-control-loop skill uses **Phase G** to enforce a configurable limit on concurrent pull requests. This *open-PR bound* prevents automated processes from flooding repositories with duplicate or conflicting PRs during unattended execution.

According to the skill documentation in [[`SKILL.md`](https://github.com/humanlayer/skills/blob/main/SKILL.md)](https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/SKILL.md#phase‑g‑open‑pr‑bound), the bound check activates for **scheduled** runs (triggered by `schedule` or `repository_dispatch`) to prevent daily loops from stacking PRs while maintainers are offline. The core logic resides in [[`agent-iteration.ts`](https://github.com/humanlayer/skills/blob/main/agent-iteration.ts)](https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/references/agent-iteration.ts), where the `checkOpenPRBound` step evaluates current PR counts against the configured threshold before proceeding with loop execution.

## Why Manual workflow_dispatch Triggers Skip the Check

Manual triggers bypass the open-PR bound through an intentional architectural separation in the workflow definition. This design reflects four key operational principles:

### Explicit User Intent

A developer triggering `workflow_dispatch` explicitly signals intent to run the loop regardless of current PR counts. This override supports debugging, testing, or emergency updates where the workflow must execute immediately without quota restrictions.

### Automated Safety Net Protection

The bound functions as a *protective* throttle specifically for **automated** runs that could otherwise create PRs without human oversight. Manual execution preserves this safety net for cron-based schedules while granting experts full discretionary control.

### Operational Flexibility

Manual runs frequently require accelerating specific changes or verifying fixes outside normal throttling windows. Skipping the bound ensures workflow completion even when temporary PR quota exceedances occur during incident response or urgent patch deployment.

### Implementation in workflow-template.yml

The separation manifests concretely in [[`workflow-template.yml`](https://github.com/humanlayer/skills/blob/main/workflow-template.yml)](https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/references/workflow-template.yml). The template defines distinct step sequences for each trigger type.

**Scheduled runs** include the bound verification step:

```yaml
on:
  schedule:
    - cron: '0 0 * * *'
jobs:
  control-loop:
    steps:
      - name: Check open-PR bound
        run: node ./check-open-pr-bound.js
      - name: Execute Phase G
        run: node ./phase-g.js

```

**Manual runs** omit the check entirely:

```yaml
on:
  workflow_dispatch:
jobs:
  control-loop:
    steps:
      - name: Execute Phase G
        run: node ./phase-g.js

```

## Technical Implementation Details

The bound check implementation spans multiple files in the `plugins/design-control-loop/skills/design-control-loop/` directory:

- **[`agent-iteration.ts`](https://github.com/humanlayer/skills/blob/main/agent-iteration.ts)**: Contains the core logic that evaluates open PR counts against the configured bound for automated triggers
- **[`workflow-template.yml`](https://github.com/humanlayer/skills/blob/main/workflow-template.yml)**: Defines trigger-specific step orchestration, placing [`check-open-pr-bound.js`](https://github.com/humanlayer/skills/blob/main/check-open-pr-bound.js) only in automated execution paths
- **[`SKILL.md`](https://github.com/humanlayer/skills/blob/main/SKILL.md)**: Documents the Phase G behavior and rationale for bound enforcement distinctions

## Summary

- **Phase G** implements an open-PR bound to prevent automated runs from creating excessive concurrent pull requests
- **`workflow_dispatch` triggers** intentionally bypass this check to provide developers with explicit override capability
- **Automated triggers** (`schedule`, `repository_dispatch`) enforce the bound through the `checkOpenPRBound` step defined in the workflow template
- **File references**: The logic appears in [`agent-iteration.ts`](https://github.com/humanlayer/skills/blob/main/agent-iteration.ts) while trigger configurations reside in [`workflow-template.yml`](https://github.com/humanlayer/skills/blob/main/workflow-template.yml)

## Frequently Asked Questions

### What is the open-PR bound in design-control-loop Phase G?

The open-PR bound is a configurable limit that caps the number of concurrent pull requests the design-control-loop skill can create during **Phase G** execution. This safeguard prevents automated schedules from flooding repositories with unreviewed PRs when maintainers are offline.

### How does workflow_dispatch differ from schedule triggers?

`workflow_dispatch` enables manual GitHub Actions execution triggered by users through the GitHub UI or API, while `schedule` triggers run automatically via cron expressions. In the design-control-loop implementation, manual triggers skip the `checkOpenPRBound` verification step that automated triggers must pass.

### Can I enforce the open-PR bound on manual runs?

The current implementation in [`workflow-template.yml`](https://github.com/humanlayer/skills/blob/main/workflow-template.yml) does not include the bound check for `workflow_dispatch` triggers by design. To enforce limits on manual runs, you would need to modify the workflow YAML to include the [`check-open-pr-bound.js`](https://github.com/humanlayer/skills/blob/main/check-open-pr-bound.js) step in the `workflow_dispatch` job definition.

### Where is the bound check logic implemented?

The core bound evaluation logic resides in [[`agent-iteration.ts`](https://github.com/humanlayer/skills/blob/main/agent-iteration.ts)](https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/references/agent-iteration.ts) within the design-control-loop skill. The workflow orchestration that conditionally includes this check appears in [[`workflow-template.yml`](https://github.com/humanlayer/skills/blob/main/workflow-template.yml)](https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/references/workflow-template.yml).