Really enjoyed reading about the journey of building Sadhan. What stands out is that creating an AI harness is not just about connecting a model to some tools, it is about designing the environment where the agent can reason, act, learn from feedback, and improve over time.
We often focus heavily on the intelligence of the model, but the surrounding system plays an equally important role. The way we manage context, tools, memory, and verification can completely change how useful and reliable an AI agent becomes.
Projects like this show that the next phase of AI development is moving beyond simple prompts into building thoughtful systems around agents. The real magic happens when technology feels less like a demo and more like a reliable collaborator that can actually help people solve problems.
Great work documenting the process. Sharing the messy experiments and lessons behind building these systems is what helps the whole AI community move forward.
Great architecture breakdown! We also use Redis for caching large datasets, and it's a game changer.
Mihai_LeanZero
The sentinel-marker trick is solid but there's a real gotcha waiting in it: if stdout and stderr aren't merged, the marker on stdout can show up before stderr has actually flushed, especially once a command spawns something with its own buffering. We hit almost this exact bug in a similar persistent-shell harness — the loop moved on thinking a command had succeeded while an error was still landing on stderr a beat later, and it took a while to notice because nothing looked wrong until much further downstream. Worth checking whether Sadhan reads both streams as one before trusting the marker, or that class of false-positive will show up eventually on a command that writes to both.