30-background-agents

30-background-agents is a cursor rule for Cursor from bybren-llc/a-safe-pulse. It costs 16 tokens per session (668 once invoked), scanned A, a copy of 30-background-agents, MIT.

Guidelines for background coding agents that work independently in isolated virtual machines, then commit changes and open pull requests.

In plain words
What is it for?
Use them to run several repository tasks in parallel and require checks such as acceptance criteria, pattern searches, branch naming, and pull-request creation.
Why use it?
They define how long-running automated work should be separated from your local checkout and kept aligned with the project's branch, commit, and review rules.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: reads .claude/ paths; mentions Cursor.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/bybren-llc/a-safe-pulse/30-background-agents
Clone the repo
git clone --depth 1 https://github.com/bybren-llc/a-safe-pulse

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 30-background-agents

README.md
[![agentmods](https://agentmods.dev/badge/rules/bybren-llc/a-safe-pulse/30-background-agents.svg)](https://agentmods.dev/rules/bybren-llc/a-safe-pulse/30-background-agents)
Your own site
<a href="https://agentmods.dev/rules/bybren-llc/a-safe-pulse/30-background-agents"><img src="https://agentmods.dev/badge/rules/bybren-llc/a-safe-pulse/30-background-agents.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 668 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.00668
Opus 5 $0.00008 $0.00334
Sonnet 5 $0.00003 $0.00134
Haiku 4.5 $0.00002 $0.00067

Measured yesterday against content hash 2ee914d16804, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

30-background-agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

91% identical to 30-background-agents — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/30-background-agents.mdc · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Background Agent Guidelines

Cursor Background Agents run long tasks autonomously in isolated Ubuntu VMs with internet access. They clone the repo from GitHub, work on a separate branch, and open PRs when complete.

How Background Agents Work

  • Each background agent runs in an isolated Ubuntu VM provisioned by Cursor
  • The agent clones the repository from GitHub (it does NOT use your local checkout)
  • It works on a dedicated branch and can commit, push, and open pull requests
  • You are notified when the task completes or if the agent needs input
  • Multiple background agents can run in parallel on different tasks

SAFe Gate Chain Compliance

Background agents MUST follow the same SAFe workflow as interactive sessions:

  1. Stop-the-Line Gate: Verify AC/DoD exists before starting work
  2. Pattern Discovery: Search patterns_library/ before implementing
  3. Commit Format: Use SAFe format type(scope): description [ASP-XXX]
  4. Branch Naming: Use ASP-{number}-{description}
  5. Exit States: Declare the correct exit state when complete

PR Creation from Background Agents

When a background agent opens a PR:

  • Reference the Linear ticket in the PR title: feat(scope): description [ASP-XXX]
  • Follow the PR template from CONTRIBUTING.md
  • Include a test plan in the PR body
  • Tag appropriate reviewers per the 3-stage review process
  • The PR still requires QAS validation and HITL merge authority

Best Practices

  • Assign one ticket per background agent for clear scope
  • Provide the full spec path: specs/ASP-XXX-feature-spec.md
  • Reference the agent role: "Act as the BE Developer" or "Act as the FE Developer"
  • Include validation commands the agent should run before opening the PR
  • Monitor agent progress via Cursor's background agent dashboard

Limitations

  • Background agents cannot access your local filesystem or environment variables
  • They start fresh from the GitHub remote each time
  • They cannot interact with local Docker containers or databases
  • Session state does not persist between background agent runs
  • They inherit repository-level Cursor rules but not user-level settings

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 75 lines · 16 tokens per session scan A 2ee914d16804

Subscribe to this mod's changes

30-background-agents is a cursor rule published in the GitHub repository bybren-llc/a-safe-pulse (9 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 668 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to 30-background-agents, differing in 12 lines, and is treated as a copy.