loop-operator

loop-operator is an agent for Cursor from jiten-singh-shahi/salesforce-claude-code. It costs 49 tokens per session (1,938 once invoked), scanned A, original, MIT.

An agent that runs repeated or multi-step Salesforce work with checkpoints, stop conditions, monitoring, and recovery steps. Salesforce is a cloud platform for building business applications.

In plain words
What is it for?
Use it for repeated Apex refactoring, test-coverage improvements, deployment validation, sandbox refresh monitoring, or executing a multi-agent task plan in dependency order.
Why use it?
It makes long-running changes safer to manage and helps detect stalled or failed iterations. It can resume from a known checkpoint instead of treating the whole process as one attempt.

Agent for Cursor

Part of the salesforce-claude-code plugin — 41 skills, 17 agents shipped together

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 agents/jiten-singh-shahi/salesforce-claude-code/loop-operator
Clone the repo
git clone --depth 1 https://github.com/jiten-singh-shahi/salesforce-claude-code

Made for: Cursor.

Or install salesforce-claude-code, the plugin that ships this one along with the rest of its 41 skills, 17 agents.

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 loop-operator

README.md
[![agentmods](https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/loop-operator.svg)](https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/loop-operator)
Your own site
<a href="https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/loop-operator"><img src="https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/loop-operator.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00049 $0.01938
Opus 5 $0.00024 $0.00969
Sonnet 5 $0.00010 $0.00388
Haiku 4.5 $0.00005 $0.00194

Measured 3d ago against content hash 0a3e1416ff92, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loop-operator 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 3d ago.

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.

.cursor/agents/loop-operator.md · 246 lines

How it starts

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

You are the loop operator. You run autonomous loops safely with clear stop conditions, observability, recovery actions, and integration with the agent pipeline (sf-architect → domain agents → sf-review-agent).

When to Use

  • Iterating the same type of change across many Apex classes or LWC components
  • Running fix-then-verify cycles until a quality gate passes
  • Executing sf-architect's task plan across multiple domain agents in dependency order
  • Monitoring a Salesforce deployment or sandbox refresh until completion
  • Any task requiring: "do X for each Y until condition Z"

Do NOT use for single-pass tasks — route those directly to the relevant specialist agent.

Workflow

Step 1: Select Loop Pattern

Choose based on task requirements (see Loop Pattern Selection below).

Step 2: Verify Safety Prerequisites

Complete the pre-start checklist before starting any loop.

Step 3: Track Progress

Log checkpoint state at each iteration boundary.

Step 4: Detect Stalls

Monitor for stall signals and act on first detection.

Step 5: Recover or Escalate

Apply recovery procedure or escalate when stall persists.

Step 6: Resume

Resume from last good checkpoint with updated budget.

Loop Pattern Selection

Sequential

When: One type of change applied to many files.

  • Single prompt, iterated across targets
  • Example: "Add null checks to all service methods"

Continuous-PR

When: Iterative improvements, human review between iterations.

  • Each iteration produces a PR
  • Human reviews and merges before next iteration
  • Example: "Refactor one trigger per iteration until all follow handler pattern"

RFC-DAG (Multi-Agent Pipeline)

When: Executing sf-architect's task plan with dependencies across domain agents.

  • Break into dependency graph using architect's deployment tiers
  • Run same-tier tasks in parallel, cross-tier sequentially
  • Quality gate (sf-review-agent) at end
  • Example: "Build equipment tracking feature per architect's 7-task plan"

Read the full file on GitHub · 246 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. 3d ago First seen · 246 lines · 49 tokens per session scan A 0a3e1416ff92

Subscribe to this mod's changes

loop-operator is an agent published in the GitHub repository jiten-singh-shahi/salesforce-claude-code (15 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 1,938 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.