Create and manage agent automations

Automations run agent tasks from a saved prompt, session configuration, and schedule. Use them for work such as summarizing repository changes or triaging issues without starting each session manually. Run an automation on demand or on a recurring schedule. You can also start from a template or share an automation as a reusable file.

Run an automation locally when the task needs your development environment. Run it in GitHub's cloud Cloud automations is experimental and might change or be removed. Share feedback about Cloud automations (opens in new tab). when you want recurring repository work to continue while VS Code and your computer are off.

This article explains how to choose between local and cloud automations, and how to create, monitor, and safely manage them.

Prerequisites

  • Set up and open the Agents window with an available agent.
  • Enable chat.automations.enabled Open in VS Code Open in VS Code Insiders in the Settings editor.
  • To use cloud automations Cloud automations is experimental and might change or be removed. Share feedback about Cloud automations (opens in new tab). , also enable chat.automations.cloud.enabled Open in VS Code Open in VS Code Insiders .

Automations are rolling out gradually. The setting is off by default on Stable and on by default in Insiders. If Automations isn't visible in the sidebar, check that the setting is enabled.

Choose where an automation runs

Local automations run with an agent on your computer and can use your local workspace and development environment. Keep the computer awake and the agent available for scheduled runs.

Cloud automations run remotely in GitHub and continue when you close VS Code or turn off your computer. Use a cloud automation for unattended work in an eligible private repository on GitHub.com. GitHub service plans, permissions, repository visibility, billing, security, and supported triggers can change independently of VS Code. Review About GitHub Copilot coding agent automations before enabling unattended runs.

Create a local automation

  1. In the Agents window sidebar, select Automations.

  2. Select Create Automation, or start from a template to fill in a starting prompt and schedule.

  3. Enter a descriptive Name and a Prompt. Specify the task, its scope, and the output you expect. For example:

    Summarize commits on the current branch from the last 24 hours.
    Group the summary by feature, fix, and maintenance work.
    Include commit references and flag changes that might need documentation.
    Do not modify files.
    

    If you start with a template, review and adapt its prompt before saving.

  4. Choose the workspace where the agent should work, or No workspace for a task that doesn't need project files. The available agents depend on this choice.

  5. Choose an available agent and review Session configuration, including the model and permission options. For a Git workspace, you can select New Worktree and a base branch when the agent supports isolation. Learn how to choose an agent and code isolation.

  6. Set Schedule to Manual to check the task before making it recurring, and then select Create.

Screenshot showing the automation creation form with the prompt, workspace, session configuration, and schedule controls.

Caution

An automation can read files, run commands, and make changes according to its agent's permissions. Review the permission level before scheduling unattended work. Saving an automation doesn't bypass organization policies or guarantee that future runs won't need your approval.

Create a cloud automation

  1. In the Agents window sidebar, select Automations, and then select Create Automation.

  2. For the workspace, select a local clone of a GitHub.com repository. To choose a repository that isn't open locally, select Work in GitHub, and then select the repository.

  3. Select Cloud as the session type.

  4. Enter a descriptive Name and Prompt. Make the task, scope, expected output, and safety constraints explicit.

  5. Select the model and review the allowed tools. Grant only the tools that the unattended task needs.

  6. Set the schedule to Manual, Hourly, Daily, or Weekly. Start with Manual so that you can review the first run before enabling a recurring schedule.

  7. Review the configuration, and then select Create.

The cloud service runs the prompt in the selected repository. It doesn't use your local working tree, uncommitted changes, or local development environment.

Start from a template

Automation templates provide a starting name, prompt, and schedule that you can review and adapt:

  • Built-in Templates contains templates included with VS Code.
  • Templates from Plugins contains templates from enabled Agent Plugins. Each template shows a Plugin badge and its source plugin.

The template sections start expanded when you have no saved automations and collapsed when you have saved automations. A blue marker on Templates from Plugins indicates that an enabled plugin contributed a new template. Expand the section to clear the marker.

Select a template to open it in the New Automation dialog. Review the prompt and schedule, and then choose the workspace, agent, model, permissions, and isolation. The Enabled checkbox is cleared by default. Select it only after you review the complete configuration, and then select Create.

Disabling a plugin removes its templates from the view. Automations that you already created from those templates and their run history remain available.

Run and review an automation

Select Run now on the automation card. The automation starts an agent session, and its run appears under History.

Select a run in History to open its session. Review the response and any changes before relying on the task's output. If the session needs approval, review the request there. If a run fails, inspect its error and session before trying again.

Each run uses the selected agent and model, so account for recurring usage when choosing a schedule.

For a cloud automation, the automation card and its history update while a run is active and show whether the run is queued, running, completed, or failed. Select Refresh to retrieve changes made on GitHub. Select Open on GitHub to review and manage the run on GitHub. You can't continue a cloud run as a session in VS Code.

Set a recurring schedule

After checking the first run, select the automation's name to edit it. Choose a Schedule, keep Enabled selected, and select Save.

Schedule When it runs
Manual Only when you select Run now.
Hourly Every hour.
Daily At the selected Time each day.
Weekly At the selected Time on the selected Day of week.

Daily and weekly schedules use your local time zone.

Keep these execution requirements in mind:

  • Keep the machine that runs the automation awake and its agent available. Agent Host-backed schedules require a running Agent Host process. Other schedules require a running VS Code window. Don't assume that local automations continue after you quit the application.
  • After an interruption, a missed schedule can trigger a catch-up run. Don't rely on every missed occurrence being replayed.
  • An automation runs one session at a time. Another scheduled occurrence doesn't start a parallel run of the same automation.

Share an automation

Export an automation as a .automation.md file to reuse it on another machine or share it with someone else. The file is readable Markdown with YAML frontmatter and contains only portable information:

  • Name and prompt.
  • Manual, hourly, daily, or weekly schedule.
  • File format version and portable identifier.

The file doesn't include the workspace, provider, model, permissions, enabled state, or run history. The person who imports the file chooses these options locally.

Export an automation

  1. On the automation card, select More Actions > Export.

  2. Choose where to save the proposed .automation.md file.

You can open the exported file in an editor to review its prompt and schedule before you share it.

Import an automation

  1. Select Import Automation in the Automations view, and then choose a .automation.md file. You can also drag one .automation.md file anywhere over the view.

  2. In the New Automation dialog, review the imported name, prompt, and schedule.

  3. Choose the workspace, agent, model, permissions, and isolation for the automation.

  4. The Enabled checkbox is cleared by default. Select it only after you review the complete configuration, and then select Create.

VS Code rejects unsupported files instead of silently changing their schedule or importing execution permissions.

Manage an automation

  • Edit: select the automation's name, update its prompt, target, session configuration, or schedule, and select Save.
  • Enable or disable future runs: select More Actions > Enable or Disable. Disabling an automation doesn't stop a run already in progress.
  • Duplicate: select More Actions > Duplicate, review the copy in the New Automation dialog, and select Create.
  • Stop an active run: select Stop for the running session in History.
  • Export: select More Actions > Export. For more information, see Share an automation.
  • Delete: select More Actions > Delete and confirm. This permanently deletes the automation and its run history.

For cloud automations, edit, enable, disable, and delete actions update the automation on GitHub. Disabling a cloud automation prevents future scheduled runs but doesn't stop a run in progress. Deleting it removes the cloud automation and its schedule from GitHub. Select Refresh after managing an automation on GitHub to update the Automations view.

Important

Turning off chat.automations.cloud.enabled Open in VS Code Open in VS Code Insiders hides cloud automation controls in VS Code, but it doesn't stop schedules that are already active on GitHub. Disable or delete those cloud automations before turning off the setting.

Cloud automation limitations

Cloud automation support in VS Code currently has these limitations:

  • Cloud automations are available for eligible private repositories on GitHub.com.
  • You can create automations with manual or scheduled triggers. For the full GitHub trigger model, see About GitHub Copilot coding agent automations.
  • Automations that use unsupported GitHub event triggers are read-only in VS Code. Select Open on GitHub to manage them.
  • You can't continue a cloud run in VS Code.
  • AI-assisted automation creation isn't available for cloud automations.

Next steps