Copilot Dynamic Workflows Add Code-Defined Orchestration

Daily Code Guide GitHub News

GitHub is introducing dynamic workflows for Copilot CLI and the GitHub Copilot app, giving developers a way to define multi-stage orchestration in code instead of relying only on a single prompt. A workflow can combine deterministic operations with one or more Copilot agents, including sequential or parallel stages, structured handoffs, checkpoints, user input, tools, and services.

The feature is in public preview, and Copilot CLI extensions remain experimental. For teams building repeatable coding or automation processes, the main opportunity is to make agent-assisted work more explicit, reusable, and controllable. The main operational considerations are permissions, extension trust, execution limits, and the differences between interactive and direct CLI use.

What changed with dynamic workflows

Dynamic workflows are programs that coordinate automated steps and agent work. This makes them different from a simple request such as asking Copilot to explain a function or make a small code change. A workflow can divide a larger process into phases, run independent work in parallel, pass structured results between stages, pause for review, and resume when appropriate.

GitHub describes the capability for Copilot CLI and the Copilot app. The supplied documentation also identifies the Copilot SDK as an availability surface, but it does not provide a complete SDK capability matrix for dynamic workflows. GitHub’s SDK compatibility guidance says that SDK access depends on features exposed through the CLI’s JSON-RPC protocol and that many interactive CLI features remain CLI-only. Developers should therefore avoid assuming that workflow behavior is identical across the CLI, app, and SDK.

Workflows are defined in Copilot extensions. They may be created for a session, stored in a personal or project extension, or distributed through a plugin. This gives individuals a way to prototype a workflow while also providing a path for teams to reuse workflow code in repositories or shared extensions.

Ad

Running workflows from Copilot CLI

Dynamic workflows require experimental features to be enabled in Copilot CLI. Users can start the CLI with --experimental or turn the capability on during an interactive session with /experimental on.

The dynamic workflow documentation describes several ways to discover and use workflows. Users can ask Copilot which workflows are available, request a description, create a workflow through a prompt, and run an available workflow by name in an interactive session.

For scripting and automation, the CLI supports direct execution:

copilot workflow run WORKFLOW-NAME

Inputs can be passed as JSON with --args, either inline or from an @-prefixed file. A workflow can also write a successful returned result to a JSON file with --result-file. The CLI provides silent and JSON output options for script-friendly use, including JSONL output that can contain the workflow name, run ID, status, and returned result.

Direct execution waits for the run to finish or stop. If it does not complete, the command reports a status and run ID. A result file is written only after successful completion with a returned result. Paused, failed, or interrupted runs leave an existing result file unchanged.

Monitoring, limits, and resumable runs

Workflows can be monitored from Copilot CLI with /workflows or from the Copilot app through the Workflows button. Run details may show phases, progress, subagent counts, active time, and AI-credit usage. Active runs can be paused or canceled.

Some stopped runs can be resumed. Paused runs and runs stopped after reaching a limit are resumable when the interface lists them as such. Completed-step and subagent results may be reused, although unsaved work may run again. A canceled run cannot be resumed. If a run stopped because it reached a configured limit, the limit must be increased before resuming.

Limits can cover the number of concurrent workflow-owned agents, the total number of workflow-owned agents, active running time, and approximate AI-credit usage. For personal CLI use, defaults are configured through settings such as:

  • workflows.defaultLimits.maxConcurrentSubagents
  • workflows.defaultLimits.maxTotalSubagents
  • workflows.defaultLimits.timeoutSeconds
  • workflows.defaultLimits.maxAiCredits

Limit precedence is documented as prompt first, followed by workflow code, then personal settings. This matters when a workflow is moved from an interactive experiment to unattended automation: the effective limits should be checked rather than assumed.

Permissions matter in unattended execution

Direct copilot workflow run execution does not display permission approval prompts. Required tool and URL permissions must be supplied before execution, using options such as --allow-tool, --allow-url, and relevant path options. Requests that cannot be automatically approved are denied.

This makes permission preparation part of workflow deployment. A command that works interactively after a user approves an action may behave differently when launched from a script or CI/CD job. Administrators should scope permissions deliberately and test the workflow with the same execution mode that will be used in production automation.

Scheduling is supported within the current Copilot CLI session through /every or /after. The CLI’s JSON output, result files, and direct execution mode can also support integration with scripts and other automation, provided authentication and permissions have already been prepared.

Extension trust and project boundaries

Reusable workflows are distributed through the Copilot extension system. Project extensions are loaded only from trusted folders or after explicit opt-in. Setting GITHUB_COPILOT_PROMPT_MODE_EXTENSIONS=true permits project extensions for an invocation, but it does not grant tool permissions.

GitHub’s extension documentation says that Copilot CLI extensions run as separate Node.js processes on the user’s computer with the user’s privileges. They are not described as sandboxed. Teams should load only extension code they trust and review repository or plugin extensions before enabling them.

The SDK documentation also describes a deny-by-default permission model and an application permission handler for requests. However, the supplied material does not establish that every dynamic-workflow operation is exposed through the SDK, so SDK-based implementations should be validated against the specific capabilities they require.

Availability and billing caveats

Dynamic workflows are in public preview and may change. The announcement describes availability across Copilot plans, but the supporting billing documentation qualifies that position for existing annual Copilot Pro and Pro+ subscribers who remain on legacy premium request-based billing after June 1, 2026. Teams should confirm how their subscription is treated rather than relying on a universal pricing assumption.

GitHub’s current general billing documentation measures usage in AI credits and defines one AI credit as $0.01 USD. The supplied sources do not establish a dynamic-workflow-specific price or consumption formula. Workflow runs can display AI-credit usage, but developers should not infer a fixed per-workflow rate from the available documentation.

What developers and administrators should do

  1. Start with a small workflow. Use a limited scope to test stages, handoffs, parallel work, checkpoints, and returned results before scaling up.
  2. Enable the required preview features. Use --experimental at startup or /experimental on in an interactive CLI session.
  3. Choose the extension location deliberately. Use a session workflow for experimentation, a personal or repository extension for reuse, or a plugin for distribution.
  4. Prepare permissions before automation. Authenticate in advance and provide the required tool, URL, and path permissions for direct execution.
  5. Set limits before larger runs. Configure agent, timeout, and AI-credit limits, then inspect run details and usage.
  6. Review extension code. Treat extensions as code running with the user’s privileges, particularly when they come from a repository or plugin.
  7. Test the target client. Do not assume that a workflow available in Copilot CLI behaves identically in the Copilot app or through the SDK.

Dynamic workflows are best suited to repeatable processes that benefit from explicit stages, parallelism, human checkpoints, or resumable execution. For a simple question or a small code change, a normal Copilot prompt remains the less complicated path.

Sources

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Ad
Ad
Ad