Running an Overnight 100-Iteration Agent Loop with a Local Qwen Model
Melvin Vivas · X video post · 2026-10-21 · 0:14 · 1,422 views · Open on X
Topics: AI Agents, Tool Use & MCP, AI Dev Tools & Productivity, LLMOps, Deployment & Monitoring · Level: intermediate
Summary
Melvin Vivas shares a small experiment. He runs a coding agent on its own overnight, using a quantized local model on one consumer GPU. The setup is Pi agent with a loop plugin, running 100 times. Each time, the agent reviews the code, finds an improvement, makes it and checks it. The post only shows the setup. The results aren't shared yet.
Key points
- Model: Qwen3.8-27B in the Q4_K_M quantization, published by Unsloth. It runs fully on local hardware.
- Hardware: a single NVIDIA RTX 3090 (24 GB VRAM). A 4-bit quantized 27B model fits on this kind of consumer GPU.
- Agent harness: Pi agent with a loop plugin, set to 100 iterations so it runs unattended.
- The task given each time: check the code, work out what can be improved, make the change and verify it.
- Adding a verification step to every iteration is meant to stop the agent from piling up broken changes over many cycles.
- Running locally means overnight autonomous runs cost no API fees. The trade-off is that a local model is slower and may be less capable.
- Results weren't shared in the post. The output was to be reviewed the next morning.
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), Prompting an Autonomous Agent Loop: Be Specific, Show Visible Progress (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), Prompting an Autonomous Agent Loop: Be Specific, Show Visible Progress (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), Prompting an Autonomous Agent Loop: Be Specific, Show Visible Progress (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 - Pi agent loop plugin · tool · check price
A Pi agent plugin that runs a task over and over for a set number of iterations. - NVIDIA GeForce RTX 3090 · tool · nvidia.com · paid
A consumer GPU with 24 GB of VRAM, used as the local hardware for image and video generation.
Also in: Grok as "Director": Making a Local Anime Clip with ComfyUI on an RTX 3090 (Melvin Vivas on X · notes), Making a 40-Second Anime Episode Locally with ComfyUI on an RTX 3090 (Melvin Vivas on X · notes), Local $0 Video Head Swap: MiniMax H3 Ref2VA (INT8) + LoRA in ComfyUI (Melvin Vivas on X · notes), Portable Computer Now Runs AI Agents and Models Locally on NVIDIA RTX PCs (Melvin Vivas on X · notes) and 6 more
Try this
- Run an agent loop locally overnight: point a coding agent at a repo and have it check the code, find one improvement, apply it and verify it, repeated N times (e.g. 100), then review the results in the morning.
- Compare overnight self-improvement loops across local quantized models (e.g. different Qwen sizes or quantization levels) on the same codebase.
More in AI Agents, Tool Use & MCP
- 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
- Multi-Agent Delegation: Email Bot Hands a Phishing Check to a Security Bot
- Keep a Change Log When Multiple AI Agents Edit One Notion Doc
- A Custom Grok Bot for Repurposing Old Hardware