aifetchly-kl

Bounded AI Autonomy: How /goal and /loop Turn a Chat Assistant into a Verifiable Work Loop

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:

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

/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

/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:

/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:

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.

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:

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

Learn more


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

#aifetchly#ai-agents#automation#productivity