<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://mohammadeissa.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://mohammadeissa.github.io/" rel="alternate" type="text/html" /><updated>2026-08-27T17:51:46+00:00</updated><id>https://mohammadeissa.github.io/feed.xml</id><title type="html">Mohammad Eissa</title><subtitle>Engineering notes on agents, evaluation, and systems that have to be auditable.</subtitle><author><name>Mohammad Eissa</name></author><entry><title type="html">I Didn’t Know What a Harness Was</title><link href="https://mohammadeissa.github.io/2026/08/26/i-didnt-know-what-a-harness-was.html" rel="alternate" type="text/html" title="I Didn’t Know What a Harness Was" /><published>2026-08-26T00:00:00+00:00</published><updated>2026-08-26T00:00:00+00:00</updated><id>https://mohammadeissa.github.io/2026/08/26/i-didnt-know-what-a-harness-was</id><content type="html" xml:base="https://mohammadeissa.github.io/2026/08/26/i-didnt-know-what-a-harness-was.html"><![CDATA[<p>A year ago I sat in a room at Boston Fintech Week and listened to a keynote
speaker get asked what the focal point would be when everyone reconvened the
following year. He said: AI agents.</p>

<p>I remember carelessly writing it down in my notes. That was the entire extent of my
response. I didn’t think much of it, and now agents are what everyone is talking
about and I’m late to the party; all because I heard something and mindlessly
wrote it down with no action plan.</p>

<p>I’d been around AI for a while by then. Computer vision projects, machine
learning coursework, using the tools like everyone else. For some reason I
never went into agents the way I should have.</p>

<p>So this summer, as an intern at one of Deloitte’s technology arms, I built one. A local, permissioned autonomous agent, from
nothing, over about two months.</p>

<h2 id="i-didnt-know-what-a-harness-was">I didn’t know what a harness was</h2>

<p>That is the honest starting point. I had heard the word, but what did it actually mean?
I had no idea.</p>

<p>I had heard of the LangGraph family without really knowing what it was. I knew
containers existed as a concept, via Docker, but had never used one. I
understood the Model Context Protocol well enough to explain it and had never
applied it to anything real.</p>

<p>A harness, as I now finally understand, is everything around the model. The model is one
component and arguably the least interesting one. The harness is what decides
which tool gets called and what happens when that tool fails. It also determines what the agent is
allowed to do without asking, where generated code is permitted to run, and what 
happens when the model produces something confident and wrong.</p>

<p>All of this was news to me because before this internship, I’d just look at benchmarks. This year alone,
people went crazy when Gemini 3 came out and within a few days, OpenAI had clapped back with GPT-5.2. Then we
saw Anthropic take the lead for months with reports of them not giving the average Joe the best models, but they
quickly changed their mind when the Chinese open-source models like Kimi K3 and Qwen 3.8 (which can run locally) emerged.
All of this does matter and I won’t stop keeping up with these updates. But for someone like me, I’m
not planning on creating my own LLM so I’ll just use the best frontier model that’s cost-efficient at the same
time. Long story short, I was focused on the wrong part of the AI stack.</p>

<h2 id="the-principle-id-defend">The principle I’d defend</h2>

<p>The single idea that shaped everything else in my agent:</p>

<p><strong>The LLM writes text. Deterministic code makes the consequential decisions.</strong></p>

<p>The model drafts the plan. It does not pick the tool. Tool selection runs
through code I can read, test, and reproduce.</p>

<p>The thing is, a model is probabilistic. When it picks the wrong tool, every node
downstream trusts that pick and builds on it, and what comes out the other end
is a confident hallucination. Unlike runnable code where I can get an error message,
I get absolute confidence and very unsafe behavior from the AI.</p>

<p>The worst version of this in my system: someone says “send the email” and the
router quietly selects “search emails.” It looks like it worked. Nothing
throws. The email was never sent.</p>

<p>So I built a deterministic guard that classifies write intent separately from
the model, and vetoes a read-tool selection when the user clearly asked to
write. Not because it’s elegant. Because that failure is silent, and silent
failures are the ones that hurt.</p>

<h2 id="regex-is-a-bandaid">“Regex is a bandaid”</h2>

<p>My tool routing started as a large regex layer which consisted of roughly 1,500 lines turning
phrasings into tool calls. It worked… kind of. I thought the project would end there
and confidently told my boss I was basically done, but little did I know that this was just the beginning.</p>

<p>My manager told me regex was a bandaid and that it wasn’t scalable. So it was back to the drawing board.</p>

<p>He wasn’t wrong, and my first instinct was to argue. What I did instead was
go find out what frontier labs actually do: trained function-calling,
structured outputs, and evaluation harnesses and then build that version on
my local model, keep the regex behind a flag so the whole thing was
reversible, and <em>measure which one was better.</em></p>

<p>That reframing is the most useful thing I took from the internship. The
question stopped being “is regex bad” and became “bad compared to what, on
what data, by how much.”</p>

<h2 id="the-number-that-embarrassed-me">The number that embarrassed me</h2>

<p>I wrote 488 prompts and split them: 300 to tune on, 188 sealed in a drawer.
Thresholds were swept on the training split only. The hold-out got opened
once, at the very end.</p>

<p>My regex router had been scoring near 100%.</p>

<p>On the sealed set it scored <strong>51.1%</strong>.</p>

<p>That gap is the entire lesson. The old number wasn’t a lie, it was train
accuracy on its own examples — I had tuned the regex against the same
phrasings I was testing it with, and then believed the result. It’s the
oldest mistake in machine learning and I walked directly into it while
thinking I was being careful.</p>

<p>The cascade router I replaced it with used a local model first, a second model
behind it, and regex only as a tiebreak. It scored <strong>89.9%</strong> on the same sealed set.
More importantly it got read-versus-write right <strong>100%</strong> of the time, against
19 dangerous misroutes from the regex.</p>

<p>Worth being precise about what that does and doesn’t mean: 89.9% is against
<em>my</em> set of roughly 45 tools, using a 7B model running locally on my machine.
A frontier model would score higher. That’s rather the point my manager was trying to put forward 
the whole time. The interesting result isn’t that it’s state of the art, it’s that a small local model plus a
carefully built harness was good enough to beat the thing I’d hand-tuned for
weeks.</p>

<p>The harness did more work than the model did.</p>

<h2 id="the-uncomfortable-part">The uncomfortable part</h2>

<p>Here is the thing I keep circling.</p>

<p>The same way AI is a loop of processes, the use of AI is a circle for a
consumer like me as well. I write code with AI. I ask questions about my code
to AI. I brainstorm with AI. And then I sat down to build an agent and a harness
whose entire purpose is deciding when to trust a model’s output… using a
model to help me build it.</p>

<p>Am I validating my work with AI, or walking into a loop of bias I should
be avoiding? Is this inherently wrong? I don’t think so. But it does
dial in on an important matter and it’s that my judgment is more important than ever.
I can now build much more impressive things and much faster due to AI, but with that comes
responsibility to make the right decision to scale a product/solution safely and efficiently. 
And yes, AI can help with that too but if you’re blindly following it, you’re the one to blame
in the end. And I think I’ve seen enough stories about companies in the consulting industry
having multi-million dollar cases brought against them because of just that.</p>

<p>When I asked AI whether my routing approach was sound, I got agreement. Useful
agreement, even. But agreement is what that interaction produces, and I can’t
tell the difference between “this is correct” and “this is plausible” from
inside the conversation.</p>

<p>In my project, I saw this when the sealed hold-out told me I was wrong. 51.1% is not 
an opinion and it did not care how confident I was. My manager saying “regex is a bandaid” was
outside the loop too and must be considered.</p>

<p>That’s the rule I’ve landed on. Use AI to build, absolutely. But every claim
that matters needs a check that can independently return “no.” A test that
fails. A hold-out you only open once. A person who’ll tell you the thing you
don’t want to hear. Without at least one of those, you’re not validating
anything, you’re just generating more confidence.</p>

<h2 id="where-i-actually-am">Where I actually am</h2>

<p>I’m in no way an expert in any of this. If anything, building the thing showed
me how far I am from going from a novice to a master. I now know what a harness
is, which mostly means I know how much of it I haven’t built yet.</p>

<p>And as a final note, the biggest lesson: AI is only as good as you are. Coding agents
are insanely good now, but after trying to build my own harness and seeing how stupid the LLM
can be was a wake-up call that if you just depend on the model’s intelligence and whatever frontier
model is going to be released next Tuesday, you’re just falling behind.</p>

<hr />

<p>The agent is open source: <strong><a href="https://github.com/mohammadeissa/langgraph-code-agent">langgraph-code-agent</a></strong>
— the cascade router, the evaluation harness, and the methodology write-up with
the full per-service breakdown are all in there.</p>]]></content><author><name>Mohammad Eissa</name></author><summary type="html"><![CDATA[What I learned building an autonomous AI agent from scratch, including the uncomfortable idea of using AI to build an AI agent.]]></summary></entry></feed>