DEV Community

Building and Optimizing a Competitive AI Coding Agent

Leonardo Weber on October 16, 2026

I developed an autonomous coding agent designed to solve challenging programming tasks in a competitive environment. Rather than relying on an LLM ...
Collapse
 
aisovereign profile image
Ananya Soni •

The feedback loop focus is spot on. Single-pass LLM generation is basically a trap, and active test-diagnose-refine passes are the only way to catch silent logic edge cases before shipping.

Building multimodal AGI architectures and autonomous agents from scratch at AGI Systems Directorate (where I'm Founder & CEO, working on our agent Project Lumina), the biggest headache with iterative loops like this is always context state corruption and compute latency stacking up during re-tests.

Quick question on your setup: are you running deterministic local execution sandboxes for the diagnostic phase, or letting the agent dynamically alter its tool suite based on error outputs? Would love to know what stack you're running this on.

Also AI agents hallucination is also one of the problems

Collapse
 
leonardo_weber_52e12e8ea6 profile image
Leonardo Weber •

Excellent point. AI hallucinations are another challenge and a problem that becomes a headache for anyone.
This is especially true when agents misinterpret error messages or assume a solution is correct without sufficient evidence. I believe combining sandbox execution, test-based feedback, and verification at each step can help reduce these issues while controlling context and latency.
When I said context, to be precise, I meant memory management.
While there may not be a silver bullet for these issues, in my experience, using a dedicated memory management product as an MCP server with a plugin also seems like a good option.

Collapse
 
aisovereign profile image
Ananya Soni •

Sorry for the late reply here, completely got buried in CEO work at AGI Systems Directorate.

Spot on regarding memory management and error misinterpretation. When you have multi-turn loops where the agent starts gaslighting itself over a bad stack trace, hallucination spirals get out of hand real quick. We run into that exact friction building our multimodal agents and autonomous systems on Project Lumina.

On your verification phase: are you handling memory pruning dynamically per turn, or just dumping history into a structured context window before it hits the diagnostic stage?

Also mostly I work in artificial general intelligence but what are you working on right now

Thread Thread
 
leonardo_weber_52e12e8ea6 profile image
Leonardo Weber •

Pruning is a very important issue in memory management.
In my experience, I prune when a specific deliverable is being generated, especially when version 1.0 of the deliverable is complete and there's an intention to develop the context for moving to version 2.0 in parallel while serial production is ongoing.
Memory dumps are generally not used.
Recently, I have been focusing on automating AI systems.

Thread Thread
 
aisovereign profile image
Ananya Soni •

Not gonna lie, using Dev.to usually feels like shouting into an empty void where new accounts get zero engagement and people just treat it like static documentation or a diary. Running into an actual technical back-and-forth here instead of total silence is a nice plot twist. Honestly might have to look into collaborating on some agent infra down the line if we keep trading notes like this.

Anyway, getting back to the technical side. That take on pruning right when version 1.0 locks down and spinning up context for version 2.0 in parallel is a solid approach. Handling that state separation without the background worker bleeding into the active execution path is usually where things go sideways. How are you isolating those branch states when version 2.0 starts spinning up while v1 is still chewing through tasks?

Also in a different note. I am working on project lumina autonomous AI agent was stop from scratch no existing frameworks . It is the large language model and autonomous AI agent with biological mechanism for artificial general intelligence for achieving it

Thread Thread
 
leonardo_weber_52e12e8ea6 profile image
Leonardo Weber •

We are adding safeguards to maintain stable synchronization. Each version has an independent state repository, and v2.0 starts from a consistent checkpoint instead of reading v1.0's live mutable state. We will prevent stale updates from overwriting the latest state by using concurrency control with checks. All state transitions are recorded in an append-only event log, which includes checkpoints for post-crash recovery.
I'm sorry, but are you also conducting LLM training research?