VS Code Copilot automations on a schedule: Sume jobs and idempotency
VS Code automations can run agent tasks hourly, daily, weekly or on demand. Make each Sume create idempotent so a rerun resumes a job instead of paying twice.

GitHub's September 2026 roundup for Copilot in VS Code adds automations. The GitHub changelog says: "Use automations to run tasks on an hourly, daily, or weekly schedule or run them on demand," read 2026-10-03. The same release lists agent merge, Dev Container agent sessions and an Agents window, and notes VS Code 1.136 to 1.140 shipped in September. A scheduled agent that calls Sume's hosted MCP server is a recurring spender, so the schedule needs the same discipline as any cron job.
What a scheduled run can break
A schedule means the same prompt runs repeatedly, sometimes overlapping a slow earlier run or restarting after a failure. For read tools that is harmless. For a Sume create tool it is a charge each time unless the call repeats an idempotency_key. The Sume tools and gates page says the key is required on paid and write tools, and the jobs guide says a client timeout does not cancel a job and it keeps billing.
| Risk | Control |
|---|---|
| Same task runs again after a retry | Derive idempotency_key from the schedule slot, such as the date |
| Run overlaps the previous one | Check jobs_result for the slot's job before creating |
| Agent loops on a wait | jobs_wait re-issue with the same ids, never a new create |
| Surprise cost | Send max_spend_usd; preview with dry_run |
| Too much access | Grant mcp:read unless the task must create |
Write the prompt as a contract
State the rules inside the automation's task text: build the key from the date and subject, call the create once, store the returned job id, wait with jobs_wait (50 seconds by default, capped at 55) and re-issue on wait_slice_expired. The GitHub post does not describe how an automation stores state between runs, so keep the job id in a file or an issue your task can read.
VS Code's MCP page says trust dialogs appear when a server starts or its configuration changes, so an unattended first run may stop at a prompt. Start the server and approve it interactively before you rely on a schedule.
A short checklist
- Key format: one stable string per slot, for example the date plus the subject.
- Cap every create with
max_spend_usd. - Prefer
mcp:readscope for report-only automations. - Treat 524, 522, 523 and 525 as transport failures, not job outcomes.
- Review the Copilot usage and the Sume balance after the first scheduled week.
Sources
Related posts
More in Agents
- What can a $5 generation spend cap make? Clips, stills, captions
A $5 cap on an Agent Completion covers 16 five-second Wan 3.0 clips at 480p, or 50 nano-banana-2 stills, but not one Seedance 2.5 clip at 720p and 15 seconds.
- What is an AI video agent? One that talks, or one that makes
An AI video agent can mean a live on-camera persona like a Tavus PAL, or an agent that makes videos for you. Which one Sume is, and how to call it from code.
- Zed ask_user forms: confirm a Sume estimate before paying
Zed's ask_user tool lets agents ask with forms. Use it as a spend checkpoint with Sume's dry_run preview, so people approve a number, not a tool name.
- Run the Sume video agent from your backend with Agent Completions
POST /v1/agent/completions runs the same agent as the Sume Agents chat, with tools and media generation, and returns an async run receipt you poll or webhook.
Written by Sume