Evidence-Based Agent Autonomy: Inside aiFetchly's /goal and /loop Engine
- The Mirage of Self-Declared Agent Success
- Architecture of the /goal and /loop Engine
- Reliable Autonomy on Your Desktop

Direct Answer: Power users overcome premature completion hallucinations and runaway agent loops by deploying aiFetchly’s native /goal and /loop commands in AI Chat V2. Instead of allowing probabilistic models to self-declare success, aiFetchly decouples execution from verification, requiring fresh, testable evidence evaluated across shell exit codes, file mutations, or independent LLM judges before an objective can be marked complete.
The Mirage of Self-Declared Agent Success
In 2026, autonomous agentic workflows have become standard across software engineering, quantitative analytics, and complex market research. However, operators managing multi-turn agent execution frequently encounter a structural failure mode: the premature completion problem.
When standard conversational agents tackle multi-step tasks—such as scraping nested directory data, fixing runtime exceptions, or generating reports—they routinely hallucinate victory. The assistant confidently asserts: “I have completed all tasks and verified the results,” when in reality the underlying script exited with an error, the output file was never written, or critical edge cases failed silently.
Conversely, without strict stopping criteria, autonomous agents can enter infinite retry loops, burning hundreds of thousands of tokens without converging on a solution.
To bridge this trust gap, the aiFetchly desktop platform introduces a deterministic state machine in AI Chat V2 driven by two complementary primitives: /goal and /loop.
Architecture of the /goal and /loop Engine
aiFetchly replaces unconstrained model self-evaluation with an evidence-based contract.

1. Verifiable Acceptance Criteria with /goal
Typing /goal <objective> in AI Chat V2 locks in a durable session goal and enters Plan Mode. The assistant decomposes the objective into explicit, testable Acceptance Criteria. Crucially, each criterion binds to a specific verification method:
command: Validates that a local shell command exits with code0or matches an expected stdout pattern.file: Verifies that a target file exists on local NVMe disk, satisfies size thresholds, or reflects content mutations.manual: Pauses execution and requests explicit operator sign-off.llm: Employs an independent verifier to assess gathered evidence against structured rubrics (satisfied,not_satisfied,blocked,needs_user_input).
2. Bounded Autonomous Iterations with /loop
Once the goal and criteria are approved, operators trigger bounded execution using /loop <maxIterations> (strictly bounded between 1 and 10 iterations).
Each iteration follows a deterministic cycle:
- Observe: Inspects current system and workspace state.
- Act: Proposes a single, bounded tool invocation.
- Execute: Runs the tool within configured safety permissions.
- Collect Evidence: Gathers fresh proof generated after the latest action.
- Verify: Deterministic command and file checks run first; the independent judge evaluates remaining criteria.
3. Strict Stopping Guarantees
The loop terminates immediately when all required criteria pass with fresh proof, when maximum iterations are exhausted, or when an unrecoverable error requires human guidance.
Full syntax rules and scheduled loop options (/loop 5m <prompt>) are documented in the aiFetchly documentation.
Reliable Autonomy on Your Desktop
By demanding fresh proof rather than conversational claims, aiFetchly ensures power users can delegate complex multi-step workflows with complete operational confidence.
aiFetchly is a local-first desktop AI business agent (free to download). Home: aifetchly.com · goal & loop docs: docs.aifetchly.com/docs/getting-started/introduction
- Reference: https://www.aifetchly.com
Write a comment