PatchVault › Errors › Agent Operator Kit (23 skills)

*/5 * * * * /usr/local/bin/run-agent.sh (no lock: runs can overlap)

An agent or script scheduled from cron takes longer than its interval, so a second copy starts while the first is still running: double API spend, duplicate commits or posts, and races on the same files.

Check your code free (runs in your browser)

The box is pre-filled with a sample that triggers this error. Paste your own file to check it. Nothing leaves this page.

Or scan your whole repo locally (free, stdlib Python, read-only):

python3 <(curl -fsSL https://patchvault-81y.pages.dev/starters/agent-config-scan.py) .
Get the Agent Operator Kit (23 skills): $19 one-time

Why it happens

cron starts each job on schedule regardless of whether the previous run finished. util-linux flock(1) with -n takes an exclusive lock and fails immediately if another run holds it.

Manual fix

*/5 * * * * flock -n /tmp/run-agent.lock /usr/local/bin/run-agent.sh >> $HOME/agent.log 2>&1

Verify

Re-run your install/build and re-scan the file above. The finding should be gone. The paid fixer applies the same change across a repo: --dry-run shows the diff, --apply keeps a .bak of each file, and --rollback restores them.

Sources

Related errors

Full guide and free terminal scanner: Agent Operator Kit (23 skills). Last checked 2026-10-31.