---
title: "Bounded AI Autonomy: How /goal and /loop Turn a Chat Assistant into a Verifiable Work Loop"
slug: "goal-and-loop"
language: "en"
date: "2026-10-06T20:28:23.894Z"
updated: "2026-10-06T20:28:23.000Z"
author: "aiFetchly"
description: "aiFetchly /goal and /loop: evidence-based, bounded AI loops in AI Chat V2."
canonical: "https://aifetchly-kl.slopit.io/goal-and-loop/"
tags: ["aifetchly", "ai-agents", "automation", "productivity"]
---

Most AI assistants work one turn at a time. You ask, it answers, you check, you ask again. That is fine for questions, but it breaks down for work that has a clear finish line ("the scraper runs and its test passes") or work that changes over time ("tell me when the deployment is done"). For those, you end up babysitting the chat — re-typing the same prompt, or trusting the model when it cheerfully says "done!" without proof.

aiFetchly, a desktop business agent, added two slash commands to its AI Chat V2 composer that tackle exactly this: **`/goal`** and **`/loop`**. This post walks through how they work, where they fit, and the guardrails that keep them from turning into an unattended runaway agent.

## The idea in one paragraph

`/goal` captures *what done means* — an objective plus explicit, checkable acceptance criteria. `/loop` then works in one of two modes:

- **Goal loop** — `/loop 5` runs up to five bounded observe → act → verify iterations toward the active goal.
- **Scheduled loop** — `/loop 5m check the deployment` re-runs a prompt every five minutes, keeping every run and every answer in the same conversation.

A bare number always means a goal loop; a duration (`5m`, `2h`) always means a scheduled loop. They never interfere with each other.

## Step 1: Define a goal you can actually verify

```text
/goal Build a Facebook campaign scraper and verify it works
```

When you run this, the objective becomes the conversation's **active goal** and AI Chat switches to **Plan Mode**. The assistant asks clarifying questions if the request is vague, then proposes a plan with one or more **acceptance criteria**. You approve, reject, or request changes, just as with any other plan.

Each criterion has a verification method:

| Method | How it's checked |
|---|---|
| command | A command exits successfully (optionally matching an exit code or output pattern) |
| file | An expected file or project state exists or has changed |
| manual | The loop pauses and asks you to confirm |
| llm | An independent verifier evaluates collected evidence for things that can't be checked deterministically |

The practical tip: **write objectives the app can check.** "The test command exits 0" is a far better criterion than "make the scraper good."

## Step 2: Run a bounded goal loop

```text
/loop 3
```

The iteration count is required and must be between 1 and 10. Each iteration:

1. Observes the current state
2. Proposes one bounded next action
3. Runs it with approved tools
4. Collects fresh evidence
5. Runs deterministic checks first, then the independent verifier for anything left
6. Continues, completes, blocks, or asks you for input

The part I like most: **the assistant doing the work cannot mark its own goal complete.** Completion needs *fresh, criterion-specific* evidence — a test that passed after the most recent change, not a stale result from earlier. The verifier returns structured verdicts (`satisfied`, `not_satisfied`, `blocked`, `needs_user_input`), never a free-text "done."

A goal loop also stops on its own when you press Stop, the iteration cap or the per-run time limit is reached, a tool or plan needs approval, the assistant has a question, or the same failure repeats three times (the goal becomes **blocked** so you can look at the root cause).

Start small — `/loop 3` — inspect what happened, then continue.

## Step 3: Use a scheduled loop for things that change over time

Not every task has a finish line you can reach by acting. Sometimes you just need to *watch*:

```text
/loop 5m check if deployment 218 finished and summarize the result
/loop 1h --times 8 -- summarize new campaign replies and flag urgent leads
/loop every 15m --for 3h -- check the contact import and report new failures
```

The shorthand form is `/loop <duration> <prompt>`. The canonical form, `/loop every <duration> [--times N] [--for D] -- <prompt>`, lets you set explicit limits; the `--` separator keeps words like "times" or "for" in your prompt from being parsed as options.

A few behaviours worth knowing:

- Intervals run from **1m to 24h**, whole numbers only (`5m`, `2h`; not `1.5h` or `5 minutes`).
- Defaults are **24 runs or 24 hours**, whichever comes first; you can raise them to 100 runs / 7 days.
- The first run happens **one interval after** you start — the confirmation message tells you the next-run time.
- Every occurrence lands in the **same conversation**, marked with a clock icon and a run label, so later runs can build on earlier observations. You can chat between runs, and the next run sees your messages.
- Control it from the header chip or with `/loop status`, `/loop pause`, `/loop resume`, `/loop stop`.

## The guardrails (why this isn't a runaway agent)

This is the section that matters if you're cautious about autonomous AI — and you should be.

- **Always bounded.** Goal loops need an explicit 1–10 count; scheduled loops always have a run-count and a lifetime cap.
- **Always cancellable.** Stop works at any point.
- **Interactive turns win.** If a scheduled run comes due while you're typing, it's deferred or merged — it never interrupts you. Runs never overlap.
- **Stricter tool policy for unattended runs.** Scheduled runs only get explicitly approved tools, high-impact tools stay blocked, and your interactive "Always Allow" choices do *not* carry over.
- **Approvals still apply mid-loop.** Destructive actions, new dependencies and authentication changes still need your normal approval.
- **Evidence is treated as data.** Logs shown to the verifier are size-capped, secret-redacted and treated as untrusted — never as instructions.
- **Sleep and restarts are handled sanely.** Missed runs produce at most one catch-up, never a burst. Time-zone and DST changes don't create duplicates.

One honest limitation: scheduled loops only run **while the app is open**. aiFetchly is a desktop app, so if you close it, the loop waits and catches up once when you return. The commands also require an active subscription with AI enabled.

## Where this fits in a real workflow

A few patterns that work well:

- **Build-and-verify:** `/goal` a small scraper or script with a test command as the required criterion, then `/loop 3`.
- **Campaign watch:** a scheduled loop every hour that summarizes new replies and flags anything urgent, for a working day (`--for 8h`).
- **Import monitoring:** check a long contact import every 15 minutes for three hours and report only new failures.

Keep Plan Mode on for goals that modify files or send anything outward, and prefer deterministic criteria wherever you can.

## Learn more

- Full reference, including troubleshooting messages and limits: [Goal and Loop Commands docs](https://docs.aifetchly.com/docs/ai-outreach/goal-and-loop/)
- The product: [aiFetchly](https://www.aifetchly.com)

---
*How do you decide when an AI agent is really "done"? I'd like to hear what checks you rely on.*
