AI Navigate

Built an AI Coding Mentor That Never Forgets Your Mistakes

Dev.to / 3/20/2026

📰 NewsTools & Practical Usage

Key Points

  • TraceX tackles the memoryless design of current coding platforms by remembering a learner's mistakes across sessions to deliver personalized, pattern-aware feedback.
  • It stores each submission's error using two function calls, retain() and recall(), with the memory residing in a purpose-built Hindsight layer rather than a database or localStorage.
  • By recalling a learner's past mistakes, TraceX identifies recurring patterns (e.g., off-by-one errors) and tailors guidance to address those specific issues.
  • The product features a 3-part feedback system (What happened, Better approach, Fixed code) and an IDE-style CodeMirror editor to provide actionable steps in a comfortable coding environment.
  • It leverages Groq's fast LLM to analyze code and generate targeted, practical feedback.

There is a moment every CS student knows.
You open LeetCode. You submit a binary search solution. It fails. You read the feedback — "wrong answer" — and you fix it. Two weeks later, you make the exact same mistake again. The platform has no idea. It treats you like a complete stranger.
I got tired of that. So I built TraceX.

The Problem With Every Coding Platform Today
LeetCode, HackerRank, CodeChef — they are all built around the same assumption. Every session is a fresh start. There is no memory of who you are, what you have struggled with, or what patterns keep tripping you up.
This is not just an inconvenience. It is a fundamental design flaw. Real learning does not happen in isolated sessions. It happens through repetition, pattern recognition, and personalized feedback over time.
A human mentor would never forget that you made the same off-by-one error three times. But every AI coding tool does — because they have no memory.
That is the problem TraceX solves.

What is TraceX?
TraceX is an AI coding mentor that remembers your mistakes across every session. You paste your code, TraceX analyzes it using Groq's lightning-fast LLM, stores the mistake in Hindsight memory, and the next time you submit — it recalls your full history and gives you feedback personalized to your actual patterns.
The tagline says it best: Trace every mistake. Never repeat one.

The Technical Core — Hindsight Memory
The entire product is built around two function calls.
After every code submission, TraceX stores the mistake:
javascriptawait client.retain(
'TraceX',
Student submitted ${language} code for ${topic}. Error found: ${errorType}.
);
Before generating feedback, TraceX recalls the full history:
javascriptconst response = await client.recall(
'TraceX',
What mistakes has this student made in ${topic}?
);
const pastMistakes = response.results.map(r => r.text);


These two calls — `retain()` and `recall()` — are what make TraceX fundamentally different from every other coding tool. The memory is not stored in a database. It is not stored in localStorage. It lives in Hindsight, a purpose-built memory layer for AI agents.

The result is real personalization. Instead of generic feedback, TraceX tells you: "You have made this exact off-by-one error in binary search 3 times now. This is becoming a pattern. Focus specifically on your loop termination condition."

---

## The Features That Make It Work

**3-Part Feedback System**

TraceX breaks every analysis into three tabs — What happened, Better approach, and Fixed code. No more walls of text. No more confusion about what to actually do next.

**IDE-Style Code Editor**

We replaced the plain textarea with a CodeMirror editor. Line numbers, syntax highlighting, active line detection. It feels like writing in VS Code inside your browser.

**YouTube Theory Links**

This is my favourite feature. If TraceX detects that you are struggling with a concept — not just the code — it asks: "Feeling unsure about binary search? Here's a great video." One click and you get the best curated YouTube explanation for that exact topic. We mapped every topic to the best NeetCode and Reducible videos.

**Targeted Practice Challenges**

After feedback, TraceX gives you a practice exercise targeting your specific error pattern. Made an off-by-one error? Here is a binary search challenge with that exact bug to fix.

---

## The Stack

Framework → Next.js 16.2
LLM → Groq API (qwen/qwen3-32b)
Memory → Hindsight Cloud SDK
Editor → CodeMirror
Deploy → Vercel

What I Learned Building This
The hardest part was not the code. It was the product philosophy.
Most coding tools are built around pressure — scores, timers, rejection messages. They feel like exams. We made a deliberate decision to build TraceX differently. No timers. No scores. Encouraging language throughout. The feedback says "Opportunity found" not "Error detected." The challenge page says "No rush — think it through."
Because learning should feel good. Not stressful.

Try It Yourself
TraceX is live and open source. The entire codebase is on GitHub and you can run it locally in under 5 minutes.
The memory layer is powered by Hindsight — the most sophisticated memory system built for AI agents. If you are building anything that requires persistent, personalized AI behavior, Hindsight is worth exploring.
Links:

GitHub: https://github.com/Anupam-codes7/TraceX
Hindsight SDK: https://github.com/vectorize-io/hindsight
Hindsight Docs: https://hindsight.vectorize.io/
Agent Memory: https://vectorize.io/features/agent-memory

Every mistake you make as a developer is valuable data. TraceX makes sure none of it goes to waste.