Prompting an Autonomous Agent Loop: Be Specific, Show Visible Progress
Melvin Vivas · X post · 2026-10-22 · Open on X
Topics: AI Agents, Tool Use & MCP, Prompt & Context Engineering · Level: intermediate
Summary
The creator restarted the 100-iteration local agent loop (Qwen3.8-27B Unsloth quant on an RTX 3090, run through Pi agent's loop plugin) because the first prompt was too conservative and general. The new prompt asks for UI changes so progress can be seen in the browser. The lesson: give autonomous loops specific goals whose results you can see.
Key points
- A vague, conservative prompt led to weak progress across the loop's iterations.
- The revised prompt asks for UI changes so each iteration's progress shows up in the browser.
- Setup: Qwen3.8-27B-Q4_K_M (Unsloth) on a local RTX 3090, with Pi agent's loop plugin set to 100 iterations.
- The per-iteration task is to check the code, find an improvement, and verify it.
- At the time of posting, the restarted loop was on iteration 5 of 100.
Resources mentioned
- Qwen3.8-27B-Q4_K_M (Unsloth) · tool · huggingface.co · free
A 4-bit (Q4_K_M) quantized version of the 27B Qwen model from Unsloth, small enough to run on one consumer GPU.
Also in: 100-Iteration Autonomous Coding Loop with Local Qwen on an RTX 3090 (Melvin Vivas on X · notes), Running an Overnight 100-Iteration Agent Loop with a Local Qwen Model (Melvin Vivas on X · notes), Use a Hugging Face Inference Endpoint as a Custom Model Provider in Pi Agent (Melvin Vivas on X · notes), Pi Agent on a Self-Deployed Qwen 27B Q4_K_M via Hugging Face Inference Endpoints (Melvin Vivas on X · notes) and 5 more - Unsloth · tool · unsloth.ai · free
Open-source library for fast, memory-efficient fine-tuning of open LLMs (LoRA/QLoRA) on a single GPU or in Colab.
Also in: 100-Iteration Autonomous Coding Loop with Local Qwen on an RTX 3090 (Melvin Vivas on X · notes), Running an Overnight 100-Iteration Agent Loop with a Local Qwen Model (Melvin Vivas on X · notes), Agent tasks: Unsloth fine-tuning, ComfyUI face swap, script writing (Melvin Vivas on X · notes), Train Your Own Decision Model Locally with Unsloth (Melvin Vivas on X · notes) and 36 more - Pi · tool · x.com · free
A customizable coding agent that can be extended through its Extensions API and connected to several model providers.
Also in: 100-Iteration Autonomous Coding Loop with Local Qwen on an RTX 3090 (Melvin Vivas on X · notes), Pi Agent: A Highly Customizable Agent with Durable Sessions (Melvin Vivas on X · notes), Running an Overnight 100-Iteration Agent Loop with a Local Qwen Model (Melvin Vivas on X · notes), Run Pi with local models on an RTX Spark laptop via llama.cpp (Melvin Vivas on X · notes) and 54 more
Try this
- Make autonomous-loop prompts specific, and ask for changes you can see so progress is easy to check.
- Run an autonomous local-model loop that makes UI improvements to a web app, so progress can be watched in the browser.
More in AI Agents, Tool Use & MCP
- How Non-Technical Users Use Grok Bot as a Thinking Partner
- 100-Iteration Autonomous Coding Loop with Local Qwen on an RTX 3090
- Pi Agent: A Highly Customizable Agent with Durable Sessions
- Grok Bot Can Manage X Livestreams via the X MCP
- Grok Bot and the X MCP Add Livestream Scheduling and Moderation
- Claude Duet: Anthropic's Research Preview of a Proactive Agent App