Building a Memory Layer with Hindsight: From Stateless Feedback to Pattern-Aware Systems
I used to think feedback systems were stateless—until I saw Hindsight pull a previous wrong approach and adjust the next hint without being told. What I Actually Built This project started as a fai...

Source: DEV Community
I used to think feedback systems were stateless—until I saw Hindsight pull a previous wrong approach and adjust the next hint without being told. What I Actually Built This project started as a fairly standard coding practice platform. A user writes code, we execute it in a sandbox, compare outputs, and return pass/fail with some explanation. If you’ve built anything like a mini-LeetCode, you already know the shape: A frontend where users solve problems A Python backend handling submissions An execution layer (sandboxed, Firecracker-style isolation) An “AI layer” that explains failures At first, everything was request → response. Clean. Predictable. Also… kind of useless after the third failed attempt. The interesting part of this repo is the memory layer—what I called “Hindsight”—that sits between code execution and feedback generation. Instead of treating each submission independently, it stores and reuses past attempts to influence future hints. Concretely, the system looks like thi