Skip to content

Feature request: Scheduled/recurring prompts #2056

@drorkremer

Description

@drorkremer

Describe the feature or problem you'd like to solve

Copilot CLI excels at agentic workflows — planning, executing multi-step tasks, and interacting with external systems via MCP. However, these capabilities are gated behind manual user input: the agent can only act when the user sends a message. Many development workflows benefit from periodic, autonomous execution: - PR review monitoring — Polling for new review comments, triaging them (fixing code, creating deferred-todo items, dismissing non-actionable feedback), committing, pushing, and resolving threads — all autonomously. - CI/CD failure watching — Detecting failed builds or test runs and proactively investigating root causes. - Periodic code health checks — Running linters, detecting drift, or validating configuration consistency on a schedule. Today, the only workaround is for the user to manually type the same prompt repeatedly, which defeats the purpose of an autonomous agent. The agent already has all the skills to perform these tasks end-to-end within a single turn — the only missing piece is a trigger mechanism.

Proposed solution

A /schedule slash command that registers recurring prompts within the current session:

/schedule "check PRs for new comments and address them" every 30m /schedule list /schedule stop <id>

Behavior:

  • The scheduled prompt is injected into the conversation queue at the specified interval.
  • The agent processes it exactly as if the user had typed it — full tool access, MCP integration, code editing, git operations.
  • Scheduling is session-scoped (does not persist across restarts initially; persistence could be a future enhancement).
  • The user can review what the agent did on each scheduled run via normal conversation history.

Implementation complexity should be low. The agent loop already handles message → plan → execute. The missing piece is a timer that enqueues a message into the existing conversation queue — essentially a setTimeout that calls the same entry point as user input.

Alternatives considered:

  • External cron + CLI invocation — CLI requires interactive TTY; no headless prompt injection mode.
  • Start-Sleep loop in a shell session — Agent cannot self-trigger; it only responds to user messages.
  • GitHub Actions / CI pipelines — Loses the agent's reasoning, MCP tools, and session context.

Example prompts or workflows

Autonomous PR review monitoring:

User: /schedule "check PRs for new review comments, triage and address them" every 30m
Agent: Scheduled task #1 created. Will run every 30 minutes.

[30 minutes later, auto-triggered]
Agent: Checked PR #15033505 - 2 new threads.
  - Thread on CachedPrevalenceService.cs: XML doc missing on public method - Fixed, committed, pushed, resolved.
  - Thread on PrevalencePluginExtensions.cs: Suggests using record types - Valid but out of scope, created deferred todo, replied with link, closed.
Checked PR #15034009 - no new threads.
Next check in 30 minutes.

Scheduled test/build validation:

User: /schedule "run dotnet test and report any failures" every 1h

CI failure investigation:

User: /schedule "check if the CI pipeline on branch feature/xyz has passed, if it failed investigate the logs" every 15m

Additional context

I'm using Copilot CLI daily with Azure DevOps MCP integration to manage a multi-slice PR workflow for a large .NET service. The agent already autonomously reviews PR comments, fixes code, commits, pushes, and resolves threads — all within a single turn. The only friction is that I have to manually initiate each check by typing the same prompt.

The Autopilot mode (experimental) helps within a single turn but doesn't address the cross-turn scheduling gap. A simple timer-based message injection into the existing conversation queue would unlock fully autonomous background workflows without requiring any changes to the agent's core execution model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions