
TL;DR
Cursor Automations lets AI agents run in the background based on triggers, not prompts. Here is how to set them up, configure triggers, and integrate into your workflow.
| Resource | Link |
|---|---|
| Cursor Documentation | docs.cursor.com |
| Cursor Pricing | cursor.com/pricing |
| Cursor Changelog | cursor.com/changelog |
| Cursor Automations Launch | creati.ai/ai-news/2026-03-08/cursor-automations-agentic-coding-system-launch |
Last updated: June 15, 2026
Cursor Automations shipped in March 2026 and changed how AI coding agents fit into development workflows. Instead of waiting for you to prompt them, automations let agents run in the background based on triggers: test failures, file saves, PR opens, cron schedules, or webhook calls.
The shift is from interactive AI to always-on AI. Teams using automations report 20-40% reductions in manual review tasks and 1-2 hours recovered per developer weekly. Here is how to set them up.
Traditional AI coding assistants are reactive. You ask a question, they answer. You prompt a refactor, they generate code. The loop requires you to be present and typing.
Automations flip this. You define a trigger and instructions once. The agent runs whenever that trigger fires, whether you are at your desk or not. Results queue up for review.
The practical difference:
| Traditional AI | Automations |
|---|---|
| Manual prompts | Automatic triggers |
| Synchronous chat | Asynchronous background |
| Developer as operator | Developer as reviewer |
| Single file context | Full repository scope |
Jonas Nelle, Cursor's engineering lead for async agents, described it as a "conveyor belt" for development: "Humans are not completely out of the picture. Instead, they are not always initiating. They're called in at the right points."
Automations are configured via YAML files in your project's .cursor/automations/ directory, or through Cursor's settings panel.
my-project/
.cursor/
automations/
fix-tests.yaml
dependency-audit.yaml
pr-review.yaml
Every automation needs three things: a name, a trigger, and instructions.
name: Fix Failing Tests
trigger:
- type: test_failure
test_command: pnpm test
debounce_ms: 5000
instructions: |
Review failing tests and source code. Identify root cause
and propose minimal fix without modifying test expectations.
Run tests in sandbox to verify before submitting diff.
sandbox:
install_command: pnpm install
env:
NODE_ENV: test
When your test suite fails, this automation spawns an isolated container, clones your repo, runs the agent with your instructions, and stages a diff for your review.
Cursor supports six trigger types. Each fits different workflow patterns.
Standard cron syntax for recurring tasks.
name: Weekly Dependency Audit
trigger:
- type: cron
schedule: "0 9 * * 1" # Monday 9am
instructions: |
Run npm audit. For vulnerabilities with severity high or critical,
check if patch versions are available. Apply patches and run tests.
Skip major version bumps.
Good for: dependency updates, dead code detection, documentation sync, weekly summaries.
Triggered on push, commit, PR open, PR merge, or branch creation.
name: PR Security Review
trigger:
- type: git
event: pull_request_open
instructions: |
Review the PR diff for security issues. Check for:
- Hardcoded credentials or API keys
- SQL injection vectors
- Unvalidated user input
- Missing authentication checks
Post findings as PR comment.
Good for: automated code review, security scanning, style checks.
Fires when your test command exits non-zero.
name: Auto-Fix TypeScript Errors
trigger:
- type: test_failure
test_command: pnpm typecheck
debounce_ms: 10000
instructions: |
Read the type errors. Fix them without changing business logic.
Prefer narrowing types over adding type assertions.
Run typecheck in sandbox to verify fix.
Good for: type errors, linting failures, test fixes.
Immediate response when you save specific files.
name: Update Changelog
trigger:
- type: file_save
patterns:
- "src/api/**/*.ts"
debounce_ms: 60000
instructions: |
If the saved file contains API endpoint changes,
update CHANGELOG.md with a brief description of the change.
Follow existing changelog format.
Debouncing is important here. 30-60 seconds prevents trigger spam during active editing.
External systems invoke automations via REST.
name: Incident Responder
trigger:
- type: webhook
path: /incident
instructions: |
Received alert from PagerDuty. Query recent logs,
identify potential root cause, and draft initial
incident report with relevant code references.
Invocation:
curl -X POST \
-H "Authorization: Bearer $CURSOR_API_KEY" \
https://api.cursor.sh/automations/{id}/trigger \
-d '{"alert_id": "12345"}'
Good for: CI/CD integration, incident response, external tool hooks.
Direct invocation through API when you want on-demand runs.
name: Generate Release Notes
trigger:
- type: manual
instructions: |
Compare current main branch to last release tag.
Generate release notes covering new features, bug fixes,
and breaking changes. Format for CHANGELOG.md.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
From the archive
Jun 15, 2026 • 8 min read
Jun 15, 2026 • 8 min read
Jun 14, 2026 • 8 min read
Jun 13, 2026 • 8 min read
Understanding how automations run helps you write better instructions.
Each run spawns a fresh container with:
The agent works in this sandbox. Changes are staged as a diff for your review. By default, nothing auto-applies.
These patterns are what teams actually use.
name: Dependency Security Check
trigger:
- type: cron
schedule: "0 8 * * *"
instructions: |
Run npm audit. For each vulnerability:
- If patch version available, update and test
- If minor version available and changelog looks safe, update and test
- Skip major versions, log them for human review
Commit passing updates. Report blocked updates.
sandbox:
install_command: npm ci
name: Fix Type Errors on Save
trigger:
- type: file_save
patterns: ["**/*.ts", "**/*.tsx"]
debounce_ms: 30000
instructions: |
Run tsc --noEmit. If errors exist in saved files:
- Fix type errors without changing runtime behavior
- Prefer type narrowing over assertions
- Do not modify test files
Stage fixes for review.
sandbox:
install_command: pnpm install
name: Pre-Review Analysis
trigger:
- type: git
event: pull_request_open
instructions: |
Analyze the PR diff for:
- Functions over 50 lines (suggest extraction)
- Missing error handling
- Unused imports or variables
- Test coverage gaps
Post analysis as PR comment, not blocking.
name: Weekly Dead Code Sweep
trigger:
- type: cron
schedule: "0 10 * * 5" # Friday 10am
instructions: |
Identify unused exports, unreachable code paths,
and files with zero imports. Generate removal PR
with tests passing. Group related removals.
Automations work alongside your existing CI. The common pattern is AI-generated insights posted to PRs before human review.
# .github/workflows/cursor-analyze.yml
name: Cursor Analysis
on:
pull_request:
types: [opened, synchronize]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Trigger Cursor Automation
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.CURSOR_API_KEY }}" \
https://api.cursor.sh/automations/pr-analysis/trigger \
-d '{"pr_number": "${{ github.event.number }}"}'
This augments human reviewers rather than replacing them.
Begin with verifiable, low-risk automations: test fixes, dependency updates, dead code removal. These have clear success criteria.
Run with auto-apply off for your first 30 days. Review every diff. Build trust in the agent's judgment before expanding scope.
For file-save triggers in active projects, 30-60 second debounces prevent trigger storms. A single focused coding session should not spawn dozens of runs.
Think of instructions as guidance for a capable junior developer. Be explicit about:
In team environments, pin your Cursor version for stability. The automations API is still in beta.
Both Cursor Automations and Claude Code offer agentic coding, but the execution model differs.
| Aspect | Cursor Automations | Claude Code |
|---|---|---|
| Trigger | Event-based, scheduled | Manual or via hooks |
| Environment | IDE-native, sandboxed | Terminal, local filesystem |
| Workflow | Background, async | Foreground, interactive |
| Pricing | Included in Cursor plans | Separate Anthropic subscription |
| Best for | Recurring maintenance | One-off complex tasks |
The practical split: Automations for background maintenance (dependency updates, PR prep, error fixing). Claude Code for foreground work (feature building, complex refactors, exploratory coding).
Many teams use both.
.cursor/automations/ directory in your projectdebounce_ms appropriately for your trigger typeCursor Automations is a feature that lets AI coding agents run in the background based on triggers like test failures, file saves, PR opens, cron schedules, or webhook calls. Instead of waiting for manual prompts, automations execute autonomously and stage results for your review.
Automations are included in Cursor Pro ($20/month), Pro+ ($60/month), Ultra ($200/month), and Business ($40/seat/month) plans. Usage is subject to monthly run quotas depending on your tier.
By default, no. Changes are staged as diffs that require your review before applying. You can enable auto-apply for specific automations, but this is not recommended until you have built trust in the agent's judgment over several weeks.
Automations complement CI/CD rather than replacing it. GitHub Actions runs deterministic scripts. Automations run AI agents that can reason about code, propose fixes, and adapt to context. The common pattern is triggering automations from GitHub Actions for AI-assisted analysis on PRs.
Yes. Automations handle background maintenance inside Cursor (dependency updates, test fixes, PR prep). Claude Code handles foreground interactive work in the terminal (feature building, complex refactors). They serve different parts of the workflow.
Failed runs are logged with error output. The automation does not retry automatically. You can review the failure, adjust instructions, and re-run manually. Setting up monitoring via webhook triggers helps catch systematic failures.
Instructions should explicitly scope what the agent can and cannot touch. For additional safety, use sandbox configurations that limit write access to specific directories or file patterns.
No. Automations require a paid Cursor subscription (Pro or higher). The free Hobby tier includes basic AI features but not background automations.
Read next
A detailed comparison of Cursor and Claude Code from someone who uses both daily. When to use each, how they differ, and the ideal setup.
9 min readCursor started as an open-source code editor and evolved into one of the most popular AI coding tools available. Here is a hands-on look at its key features, pricing tiers, and how it compares to traditional editors like VS Code.
10 min readCursor just shipped Composer 2 - a major upgrade to their AI coding assistant. Here is what changed and why it matters.
5 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Codeium's AI-native IDE. Cascade agent mode handles multi-file edits autonomously. Free tier with generous limits. Stron...
View ToolMac app for running parallel Claude Code, Codex, and Cursor agents in isolated workspaces. Watch every agent work at onc...
View ToolAnthropic's agentic coding CLI. Runs in your terminal, edits files autonomously, spawns sub-agents, and maintains memory...
View ToolAI-native code editor forked from VS Code. Composer mode rewrites multiple files at once. Tab autocomplete predicts your...
View ToolCompare AI coding agents on reproducible tasks with scored, shareable runs.
View AppDefine AI-assisted business automations without locking the workflow to one vendor.
View AppQueue and organize repeatable agent workflows before they become production automations.
View AppConfigure Claude Code for maximum productivity -- CLAUDE.md, sub-agents, MCP servers, and autonomous workflows.
AI AgentsWhat MCP servers are, how they work, and how to build your own in 5 minutes.
AI AgentsStep-by-step guide to building an MCP server in TypeScript - from project setup to tool definitions, resource handling, testing, and deployment.
AI Agents
Auto Agent: Self-Improving AI Harnesses Inspired by Karpathy’s Auto-Research Loop The video explains self-improving agents and highlights Kevin Guo’s Auto Agent project as an extension of Andrej Karp...

Check out Replit: https://replit.com/refer/DevelopersDiges The video demos Replit’s Agent 4, explaining how Replit evolved from a cloud IDE into a platform where users can build, deploy, and scale ap...

A detailed comparison of Cursor and Claude Code from someone who uses both daily. When to use each, how they differ, and...

Cursor started as an open-source code editor and evolved into one of the most popular AI coding tools available. Here is...

Cursor just shipped Composer 2 - a major upgrade to their AI coding assistant. Here is what changed and why it matters.
Every major AI coding tool just went through a pricing shift. Here are the exact numbers for Cursor, GitHub Copilot, Cla...
Fable 5 landed on June 9, GitHub Copilot rewired its billing on June 1, and the tool-stack decisions you made in Q1 may...

Graphify is trending because coding agents keep hitting the same wall: they can edit files, but they still need a durabl...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.