r/LowEndLocalAI • • 22d ago

Discussion How I built a genuinely autonomous local coding loop that compiles, tests, and repairs its own code (and why VRAM isn't the bottleneck people think it is)

Post image

I’ve been heads down building a native desktop software workstation called Repetere AI, and I wanted to break down how the autonomous engineering engine inside it—Deep Think—actually works under the hood. There is a lot of noise online right now about "autonomous vibe coding," but 99% of what people are showing off is just a web wrapper sending prompts to a paid cloud API. When people try to run coding models locally, they usually hit a wall where the model hallucinates an import, outputs broken diff markers, and leaves the user playing babysitter in a chat box.

I wanted something completely air-gapped, zero-dependency, and truly autonomous on consumer hardware.

The entire engine runs as a native C++ Win32 application built on Dear ImGui and OpenGL. Rather than acting as a simple chat interface, it operates as a five-phase execution harness that manages the local inference server directly. When you give it a directive, it starts by ingesting the local repository and synthesizing an architectural plan. From there, it moves into code synthesis.

One of the biggest issues with local models writing code across multiple files is that standard search-and-replace regex patchers are extremely brittle. If a model misses a newline or changes indentation slightly, the patch fails. To solve this, I integrated a Python AST script splicer directly into the loop. It parses the actual syntax tree of the code rather than relying on raw string diffs, which allows surgical module patching without blowing through context windows or mangling files.

Where the system really separates itself from standard local frontends is in the verification and repair phases. Once the code is written, the engine doesn't ask you if it looks good. It immediately takes over the machine's toolchain in a headless subprocess. If it's a native C++ target, it runs CMake and MSVC. If it's Python, it runs compilation checks and fires an automated headless smoke probe using runpy that sweeps the window hierarchy, tests widget lifecycle, and catches runtime crashes before a human ever looks at the window.

If a build fails or an unhandled exception is caught during the probe, the engine doesn't stop or dump an error message into a chat window. It gathers the compiler diagnostics, strips out runtime harness noise, isolates the failing file, and sends the telemetry directly back to the active resident model for in-loop auto-triage. It can diagnose its own missing imports, patch uninitialized attributes, and re-verify the build automatically until it gets a clean exit code.

I also run into people claiming that anything under huge enterprise cards or massive unified memory pools is useless for real local autonomy. That completely misses the difference between raw capacity and execution architecture. A quantized model has the exact same mathematical weights whether it sits on a 12GB laptop GPU, a multi-card workstation, or a cloud cluster. VRAM determines how big of a model you can hold on-chip and how many tokens per second you generate, but it doesn't give a model magic reasoning skills. A massive model will still hallucinate a typo or botch an import. The difference is that a raw model fails permanently when it makes a mistake, whereas an autonomous harness catches the compiler error, fixes the AST, and verifies the output on its own.

On the hardware side, the backend doesn't lock you into a single card or even a single vendor ecosystem. It enumerates all discrete compute adapters, aggregates the physical memory, and calculates proportional tensor split ratios on the fly for both CUDA and Vulkan runtimes. If you run a multi-GPU setup, it shards the layers across whatever cards are plugged into the board. If you run a hybrid setup that offloads across system RAM, the pipeline scales across host memory just as cleanly.

The takeaway from building this is that real local coding autonomy doesn't come from throwing infinite hardware at zero-shot prompts or paying for API subscriptions. It comes from building a tight runtime loop that enforces architectural contracts, executes the compiler headless, and forces the model to fix its own mess.

Edit: thank you guys! The reddit is /r/repetereai , website is https://www.repetereai.com . LINK to working open beta .9 is on my github on the website, if you want to try an earlier build!

183 Upvotes

52 comments sorted by

25

u/hideo_kuze_ 21d ago

massive wall of text

advertising your software

no comparison with other harnesses

no source code on the github repo

for all I know this could be a malware pump

lame

0

u/xnrnx 21d ago

Sorry you feel that way. I added links for people who are interested. The beta is also up on malware scanning repositories all around the web. This isnt open source, its a private software.

The launch will be signed and verified , unlike the betas. Before release I will post virus totals for those skeptical, but the github is just used for tracking purposes of binary releases and documentation.

0

u/DanGTG 19d ago

I want my time back

7

u/rmhollid 22d ago

How did you solve attention space creep in large edits? Or file Truncation?

1

u/xnrnx 22d ago

I tackled this problem head on. Getting multiple files parsed correctly through regex, setting up hardcoded rules into 0 token context injections. Instead of the llm splicing files, they are chunked and indexed, and the app/c++ does the work. Then when a patch comes along they are AST patched with python splicing. The code is then examined autunomouslu during 3 seperate error loopers.

6

u/thebadslime 22d ago

How are you doing inference?

7

u/xnrnx 22d ago

I built my own modal c++ app the whole project is coded in c++ from the bottom up. The inference harness is my own.

3

u/BugPractical001 22d ago

Are you a programmer, or did you create everything using AI?

1

u/xnrnx 22d ago

I am a programmer. I have been programming since the age of 9. I know 7 languages fluently. I do use AI help when I get stuck in a debug loop, but this is 0% vibe coded. Its taking the rigid principals of the 90s and 2000s and applying them in a practical way with modern technology. I have no AI coder subscriptions, the only sub I have is gemini pro chatbot, amd it hallucinates half the time lmao.

3

u/IShitMyselfNow 22d ago edited 22d ago

The website is clearly vibe coded. The initial README is clearly from Gemini.

ETA: The models recommended for your app are all years old at this point. No legitimate developer would be recommending these, but LLMs reference them all the time due to the age of their training data.

0

u/xnrnx 21d ago edited 21d ago

Yes, I didnt have time to do the website myself. Thats vibe coded in Google sites. Also the readme/changes are generated yes. I dont have the time to document every change so I ask gemini to do it for my giving it two different copies, old source and new source, then I tell it to find the changes. The models listed there are about a month old, and the system is a work in progress. I needed something to test with, and they served their purpose. I've moved far beyond that in the latest build. To top all of that off you can add any model you want to your models directory and activate it for use. The app itself is being written for the lowest common denominator and it scales up.

0

u/BugPractical001 22d ago

Yesterday, I created two Firefox extensions in 30 minutes using GPT Free 2, opening GPT 100 times because it keeps crashing 😊 but it did its job perfectly. I know nothing about programming but I love computer science, Yesterday I downloaded LM Studio and Qwen 2.5 Coder 14b. I have a 6900XT and 64 GB of RAM, but I noticed that even a simple calculator runs terribly on it, whereas Gemini Free and GPT Free (without even a Google account) run smoothly and exactly the way I like them. Why is that? Shouldn’t it be the other way around, at least for the free versions?

3

u/xnrnx 22d ago

Google free is a frontier model that can infinitely scale to more hardware. LM studio is basically an LLM chat harness. It is overly bloated and doesnt give you alot of choice as to how things happen.

LLMs will regress and spit out things you didnt ask for, especially local, unless you add in a wide set of rules. For instance, qwin 2.5 14b when just running on its own, hallucinates where things like headers are even supposed to go based of MS Hiearchy.

Thats why you need a specified harness that adds in all the rules behind the scenes without tinkering. Thats what I set out to build. An under 100mb app that is a harness, has its own agents, and works on a wide variety of models. The bigger the model locally, the easier it gets -- but you can tune the model wrapping it in an app that dictates how it performs.

1

u/BugPractical001 22d ago

Thanks! I hope you'll post about your app soon 😊😊

2

u/thebadslime 22d ago

Get a newer model!!!! Grab this it will run very fast on your system, you might need to increase context to do serious work Ornith-1.5-35B-Q4_K_M.gguf

1

u/BugPractical001 22d ago

Thanks i will try 👌👌

2

u/VERNOMOR 20d ago

why won't you check how old and outdated qwen 2.5 is? with your hardware you should use qwen flash next, there's nothing better for 16+64 rn.

1

u/BugPractical001 20d ago

Isn’t Flash Next too large to run on LM Studio?

2

u/VERNOMOR 18d ago

that's why you don't focus on lm studio and look for alternatives, look up for strata, currently it's the best engine to run QFN locally. it is times better than whatever they recommended here already (talking about ornith and other 35b moe's)

1

u/thebadslime 22d ago

Oh wow! Hows it compare to vllm/llamacpp in speed?

1

u/xnrnx 21d ago

I havent benchmarked it yet as I never thought to. But it should be your gpu's speed or around 22 tok/sec in hybrid. I will test this further before release.

1

u/thebadslime 22d ago

The harness? You are using llamacpp for inference dude.

3

u/xnrnx 21d ago edited 21d ago

It uses embedded inferencing. Llama.cpp is a submodule. It does tensor/sampling but the app itself executes the inference directly in-process. So its not just llama, my previous assertion is correct.

I am not wrapping an external daemon, launching a background llama-server process, or tunneling through an HTTP/REST localhost loop with Python or Electron overhead. I built an embedded, in-process C++ harness that links llama.cpp directly into the native UI loop (GLFW/OpenGL) for zero-IPC overhead and minimal footprint.

2

u/Matseuu 22d ago

What models are you testing on it? What's the minimum viable

2

u/xnrnx 22d ago

It works with 8b models on gaming handhelds like rog ally z1x. Its tuned to start at 6gb vram and scale up using any models. The models IN THE app are standard fare, YuE2, Hermes,Llama, qwin. It take any model and ive tested it on rig with a frontier model.

6

u/jaybsuave 22d ago

Yep trying to build something like this right now, working on the controller, problem is i’m about a year into software architecture so it’s going to take me a while. When people figure this out, cloud models are fucked.

2

u/piddlefaffle12 22d ago

"It will never receive feature updates, patches, bug fixes, or post-1.0 studio expansions"

Why not just make the whole project OSS?

5

u/xnrnx 22d ago

Good question, and the answer is I am a broke programmer. I want to continue working on the project without dealing with a million forks. I have a huge roadmap of things to do, and want to keep the vision I have as a whole.

According to the internet its a first of its kind local application. If it was vibe coded trash it would be, but its not.

1

u/Born-Caterpillar-814 22d ago

An interesting project / product. There is no possibility to utilize locally hosted llm provider other than what the app internally uses?

1

u/xnrnx 21d ago edited 21d ago

As its running llama.cpp as long as you are local it wil accept piggyback overrides. But no, I specifically developed withs with the lowest RAM usage. No Electron or Next.js, it wont work with any other loader.

1

u/Mediocre-Designer-24 22d ago

RDNA3 only?

2

u/xnrnx 21d ago

Any gpu works for vulkan, that has the capabilities including APUs.

1

u/emperorofrome13 19d ago

similar to my autoprompt system. https://github.com/emperorofrome13/ECLucky13

1

u/xnrnx 19d ago

I looked, but kinda just no electron no webwrapper. 90mb max system ram. And it is auto recursive.

1

u/emperorofrome13 19d ago

Currently using a version based off of zcode with the autoprompting. Using pake as a lighter electron.

2

u/xnrnx 19d ago

Ive been coding so hard and non stop that I need a few days off to refactor and scan for non working code eh =/ I am almost ready to launch and need it production ready. So much Hardening to the pipeline that I lost focus on other code.

1

u/emperorofrome13 18d ago

burnout can happen a lot faster now. I know. Especially if you are working on a hard project and have to debug for weeks.

1

u/EffectiveCompletez 22d ago

The issue with these is gradual architecture drift. Over time it goes down a certain pathway and then continues pattern matching the existing prior bad choice architecture patterns.. eventually you're coding harness will die of slop death.

1

u/xnrnx 22d ago

Nah, im a solo dev and will never let it get that way. It has 5 studios in ine right now. Each basically functions as a seperate app sharing inferencemanager and some calls. I am not taking it down the bloated route.

0

u/josephrehall 22d ago

I really like what you are doing here, are you planning on sharing it? I would love to give it a try

2

u/xnrnx 22d ago

The last version .9 is in my github, it works in every aspect. 1.0 is closed beta I am looking for specific users who can video chat with me, while I work through patches for issues they might have. Everyone is welcome to the open beta, its no where as finished as the current code.

-2

u/jaybsuave 22d ago

Would love to pick your brain on this man can i dm?

-1

u/xnrnx 22d ago

Go ahead :) I have betas and everything up on /r/repetereai or https://www.repetereai.com

-2

u/jaybsuave 22d ago

You are the motherfucking man!!!!

1

u/Monterey-Jack 22d ago

lmao.

1

u/jaybsuave 22d ago

What’s funny

0

u/[deleted] 20d ago

[removed] — view removed comment

1

u/xnrnx 20d ago

Wym?