AGENTICAMIT // LOOP ENGINEERING · WORKED
the same machine, given a real job
AgenticAmit // worked example // sheet 2 of 2
One task, five turns.
Same ring as the schematic, now with real work on it: an agent
fixing a flaky test, start to finish. Nothing on the ring is clever.
Scroll, and see why it doesn't need to be.
Stage 01// ingestturn 01 · step 1 of 6
It packed light, on purpose.
Out of the whole repo: two files, one memory,
three tools. Everything else stayed outside the window.
▸ the packing list, verbatim
taskfix the flaky retry testfiles src/retry.py 1.2k tests/test_retry.py 0.8kmemory"flaked 3x this week, always on slow CI"tools run_tests · read_file · edit_file
// the skill here was leaving the rest of the
repo out.
Stage 02// assemblestep 2 of 6
The window, itemized.
This is the entire world the model will see this
turn. Rules first, the ask last: recency is weight.
▸ the assembled window, block by block
[system]8.0k rules + tool schemas[history]0.0kfirst turn, empty[knowledge]8.9k both files + the memory[ask]0.1k"fix the flaky retry test"─────────────────────────────window17.0k of 64k
// prompt = f(context). Can't diff it, can't debug it.
Stage 03// model callstep 3 of 6
It talked, then it asked.
The reply is just tokens: a thought, and a
request. Note what it did not do: guess at a fix.
▸ the reply, raw blocks, nothing run yet
text"The failure is timing-shaped: test_backoff asserts elapsed < 0.3s. Reproducing it before touching anything."tool_callrun_tests( path="tests/test_retry.py")
// a tool call is a sentence until something
executes it.
Stage 04// parse & routestep 4 of 6
Two blocks, two lanes.
The parser doesn't understand the plan. It only
sorts blocks: words to the transcript, calls to the sandbox.
▸ the routing table for those two blocks
block 1 text → say itblock 2 tool_call → run_testsrouted 1 say · 1 callmalformed0// errors go back around
// on a bad turn, "malformed" is the row that
saves the crash.
Stage 05// execute + observe
There's the flake, red-handed.
The agent didn't theorize. It ran the suite inside
the wall and watched: 0.312 seconds against a 0.3 limit.
Every station did something a careful junior could do: pick two files,
order a window, run the tests, keep one lesson. The intelligence is
in the lap, not the stop. That is loop engineering, worked.
One Task, Five Turns · companion to the Loop Engineering schematic ·
an AgenticAmit engraving.