Stops too early
Agents often stop when work merely looks done. Goal Loop moves the "is it done?" decision into a shell check.
Cursor plugin · check-backed autonomy
A small /goal command that keeps agents working until a shell
check passes — not until the model decides it looks done.
Load the plugin from a local clone (proven path) or from the marketplace once published. Unattended continuation needs Cursor Agent Auto-run.
git clone https://github.com/bodecloud/goal-loop.git
cd goal-loop
cursor-agent --plugin-dir "$PWD" --workspace /path/to/project
Commit a shared baseline check when the repo has one:
{
"verify": {
"commands": ["npm run build"],
"cwd": ".",
"timeout_ms": 600000
},
"limits": {
"max_iterations": 20,
"max_wall_ms": 7200000
}
}
This site is served at bodecloud.github.io/goal-loop/. Marketplace availability is not proven by this repository alone.
Start with one clear objective and one real check:
/goal "Fix build" --verify "npm run build"
.cursor/goal/active.jsonfollowup_messagecompleted and {}/plan [objective]/goal-status/goal-abortAgents often stop when work merely looks done. Goal Loop moves the "is it done?" decision into a shell check.
With Auto-run, a failed check becomes the next instruction automatically.
Contract and run logs live in the project, so every loop stays reviewable and portable.
One project-local JSON file is the state machine shared by the command, hook, and agent.
{
"version": 1,
"status": "active",
"objective": "Fix the app build",
"verify": {
"commands": ["npm run build"],
"cwd": ".",
"timeout_ms": 600000
},
"limits": {
"max_iterations": 20,
"max_wall_ms": 7200000
},
"completion_promise": null,
"started_at": "2026-06-30T00:00:00.000Z",
"iteration": 0,
"last_verify": null
}
| Field | Purpose |
|---|---|
objective |
Human target the agent works toward. |
verify.commands |
Shell commands rerun after each finished turn. |
verify.cwd |
Working directory for the check. |
limits |
Guardrails against runaway looping. |
last_verify |
Latest result, exit codes, and log path. |
npm run build
npm test -- --testPathPattern=auth
scripts/smoke-check.sh
test -f generated/report.json
Lint for a runtime bug, file existence for a meaning rewrite, or a flaky network probe for a local, repeatable fix.
All check commands exit 0 → status completed, hook returns {}.
Failure writes a run log, updates last_verify, returns followup_message.
/goal-abort, max iterations, or max wall time.
Unexpected hook errors log to hook-errors.log and return {}.
.cursor/goal/active.json.cursor/goal/defaults.json.cursor/goal/runs/last_verify.log_pathEnable Cursor Agent Auto-run so the follow-up is submitted automatically.
Usually the check was too weak for the request — not a loop bug.
Cursor guide → how to choose a check → examples.
Goal contract + check design explain structure and who decides done.
Decision guide and FAQ: does this check model fit your workflow?
Bounded objective, matching check, Auto-run if unattended.
Read active contract, defaults, run logs, and hook-errors before changing tactics.
Re-check whether the check proved the request or only a narrow proxy.
Bounded and aligned — not a vague catch-all.
Proves the request; produces actionable failure output.
A passing check proves only what that check covers.
Docs tie behavior to hook, contract, CLI, and plugin files.
Pass, fail, abort, and fail-open are covered in the current suite.
Evidence map marks what the docs do not prove.
Build repair, focused tests, or simple file-proof tasks first.
Commit defaults only for a true shared baseline; else use --verify.
Commit conventions; ignore live loop state and run logs.
/goal "Fix build" --verify "npm run build"
/goal "Repair auth tests" --verify "npm test -- --testPathPattern=auth"
/goal "Finish release fix" --verify "npm test" --verify "npm run build"
/goal "Create proof file" --verify "test -f .cursor/goal/proof.txt"