Skip to content

GitHub Copilot Dynamic Workflow Tutorial: Build a Reusable Code Review

GitHub Copilot dynamic workflows let developers combine code-defined steps with AI agents. Learn how to create, test, limit and run a reusable workflow.

GitHub Copilot Dynamic Workflow Tutorial: Build a Reusable Code Review

On this page

GitHub added dynamic workflows to Copilot CLI, the GitHub Copilot app and the Copilot software development kit on October 1, 2026. The feature lets you define a repeatable programming process in code, combine normal commands with one or more AI agents, run independent work in parallel and pause at checkpoints for human review. That makes it different from simply asking an AI coding assistant to perform the same task from scratch each time.Β 

What a dynamic workflow changes for developers

A normal Copilot prompt describes what you want done, while a dynamic workflow describes how the job should be carried out. The workflow can run commands, call tools, divide work between agents, pass structured results between stages and stop at a checkpoint before continuing. GitHub specifically lists codebase sweeps, pull-request reviews, release checks and research-to-implementation processes as suitable examples. The workflow itself is implemented through a Copilot extension, which gives the process a reusable definition instead of leaving its sequence buried in one chat session.Β 

That distinction becomes useful when a task has rules that should not change from one run to another. Suppose a project needs every changed file reviewed, test coverage checked, findings independently verified and a final report produced. A normal prompt can ask for all four actions, but the agent decides how to execute them during each conversation. A dynamic workflow lets the developer encode the stages and hand the judgment-heavy parts to agents while keeping the overall process predictable.Β 

What you need before creating the workflow

For Copilot CLI, dynamic workflows are currently in public preview and require experimental features to be enabled. GitHub says you can start the CLI with the --experimental option or turn experimental features on inside an interactive session with /experimental on. Dynamic workflows are available across Copilot plans, although the feature itself can change while it remains in preview.

Preview warning: Dynamic workflows are a public-preview feature. GitHub says the feature is subject to change, so commands, extension behavior and workflow authoring details may change between releases.Β 

Turn on experimental features in Copilot CLI

  1. Open a terminal. Start the GitHub Copilot CLI in a terminal where you can work with the project you want to review.
  2. Enable experimental features. Start Copilot CLI with --experimental, or enter /experimental on during an interactive session. GitHub documents both methods for accessing dynamic workflows.Β 
  3. Check the available workflows. Ask Copilot, β€œWhat dynamic workflows are available?” If you already have workflows supplied by a personal extension, project extension or installed plugin, Copilot can list them.Β 

If the workflow list is empty, that does not mean dynamic workflows are unavailable. It simply means there is not yet a workflow registered for the current session or environment. The next step is to create one and give it a process that is specific enough to test.Β 

Create a reusable code-review workflow

For a first workflow, code review is a useful test because the stages are easy to verify. The example below asks Copilot to create a workflow named review-changed that finds changed files, sends them to an agent for review and produces a summary. GitHub's own documentation uses essentially this workflow pattern as its creation example, so the important part is not the wording of the request but the separation between deterministic steps and agent-based analysis.Β 

  1. Ask Copilot to create the workflow. Enter a request such as Create a dynamic workflow named review-changed that lists changed files, asks an agent to review them, and summarizes the findings.
  2. Approve the authoring request. Copilot may ask for permission to create the workflow and additional approvals while it builds the extension. Approve only the permissions required for the process you intend to run.Β 
  3. Check that registration succeeded. Ask Copilot, β€œWhat dynamic workflows are available?” and confirm that review-changed appears in the result.
  4. Run the workflow on a small scope first. Use a small set of changed files or a limited test repository before expanding the workflow to a larger codebase. GitHub recommends limiting early runs so you can assess the result before changing the workflow definition.Β 

The result is more than a saved prompt. GitHub says the workflow is implemented as an extension, and a workflow created during a session is initially available only to that session unless you move its extension into a personal or project extension location. That separation also means creating the workflow does not automatically run it; authoring and execution are separate operations.Β 

Add stages instead of putting everything into one agent prompt

The useful design pattern is to keep mechanical operations outside the agent wherever possible. A workflow can first collect the changed files, then run independent review tasks in parallel, then pass structured findings into a final stage that combines them. GitHub describes this ability to pass structured results between stages and to run independent tasks in parallel as one of the main reasons to use dynamic workflows.Β 

For example, a larger review workflow could have four stages: identify changed files, inspect the implementation for defects, inspect the tests for missing coverage, and combine the findings into a report. The first stage can determine the exact input while separate agents examine different concerns. The final stage receives the earlier results instead of having to rediscover everything, which gives the workflow a defined shape that can be reused on another pull request.

Put limits around expensive agent work

Agent workflows can consume more resources than a single coding request because several agents or stages may run during one operation. GitHub's documentation recommends setting limits on dynamic workflows, particularly when a workflow can fan out into many tasks. Limits can restrict how much AI work the process is allowed to perform, reducing the chance that a broad repository operation unexpectedly consumes excessive resources.Β 

This is also where a workflow differs from simply telling an agent to β€œreview everything.” The workflow can define the scope and checkpoints before execution starts. For a first run, limit the number of files or agents, inspect the output, then revise the saved workflow if the process needs adjustment. GitHub documents this iterative approach specifically for dynamic workflows.Β 

Run the workflow directly from the command line

Once a workflow is registered in an extension, Copilot CLI can run it without opening an interactive conversation. GitHub provides the copilot workflow run WORKFLOW-NAME command for this purpose. Inputs can be supplied as inline JSON or from a JSON file, which makes the workflow usable from scripts as well as an interactive terminal.

copilot workflow run review-changed --args '{"directory":"."}' --silent --output-format json

The exact input names depend on the workflow you created, so the example only works if your workflow defines a directory input. GitHub also warns that the command-line workflow runner does not display permission approval prompts, so required tool and URL permissions should be granted before the run starts. Requests that cannot be automatically approved are denied.Β 

Move the workflow from a personal experiment into a project

A workflow becomes more useful when other developers can run the same process without rebuilding it. GitHub allows a workflow extension to be stored as a project extension so it can travel with the repository, while personal extensions can make a workflow available across your own projects. When you copy a workflow into a repository's extensions directory, GitHub says the definition is copied, not its previous run history or saved progress.Β 

For a team workflow, keep the definition in version control and review changes to it like code. That matters because changing the workflow changes the process every developer will execute. After updating a shared workflow, GitHub says teammates need to pull the updated repository and reload their extensions before the revised definition is used.Β 

Know when a dynamic workflow is the wrong tool

Not every coding request deserves a workflow. GitHub recommends ordinary Copilot interaction for quick answers and simple changes, while dynamic workflows make more sense when a process is reusable or contains multiple stages, checks or limits. If you only need an explanation of an error or a one-file edit, authoring a workflow adds machinery without solving a recurring problem.Β 

The strongest use case is a process you expect to repeat and want to make inspectable. Code reviews, repository sweeps, release checks and research followed by implementation all have enough structure to benefit from predefined stages. Start with a narrow workflow, test it on a small input, inspect the results, then save it as a project extension once the process is reliable enough for repeated use.

M. Rizwan Mirza profile photo

Written by

M Rizwan Mirza

I’m M Rizwan Mirza, a Full Stack Developer with over 12 years of experience in web development and software solutions. I work with modern web technologies and enjoy building practical, reliable, and user-friendly digital solutions. I’m also part of TechWare House, where I work on web development projects and technology solutions. One of my favorite websites is TheQuranic.com. Through WizTechnoz, I share my knowledge, experience, tutorials, and useful insights about technology.

86 posts published

All posts by this author

Copy this post

0 Comments

No comments yet. Be the first to share your thoughts.

Join the conversation

Log in or create a free account to leave a comment. You can edit or delete your own comments any time.