Most AI coding tools are assistants. They suggest the next line. You review it, copy it, run it, hit an error, ask again. The human is still the one closing the loop.
I wanted to see what happens when the loop closes itself — so I ran a small POC to find out. This is not production code. It’s a learning experiment, built to understand how agentic systems actually behave, with real numbers from a real deployment.
The tool is Strands — an open-source SDK released by AWS in May 2025, already running in production inside Amazon Q Developer and AWS Glue. The idea is simple: give it a plain-English description of a Python function, and it writes the code, writes its own tests, runs them, reads the failures, fixes the bugs, and repeats until everything passes. No human involved after the initial spec.
Then the same agent gets deployed to AWS Bedrock AgentCore Runtime, and you can read the live traces of every decision it made.
Full POC code and build guide: github.com/yadv-arvind/spec-to-code-using-strands-agents
Here’s what one real invocation looked like in CloudWatch — a single run asking the agent to write a slugify function:
14 spans · 11.56 seconds · 3,697 tokens · $0.003
The trace breaks down as: 3 event-loop cycles → 3 model calls → 2 file writes → 1 test run. Write the implementation, write the tests, run them. Tests passed on the first attempt. Total cost: less than half a US cent.
Three things in those numbers are worth slowing down on.
Tools are nearly free. The model isn’t. Both file writes together took 0.04 seconds. The model calls took 11.40 seconds — over 99% of total wall-clock time. This is a useful thing to understand about agentic systems: optimising your tools buys almost nothing. The only real levers are reducing the number of model calls, or switching to a cheaper model for simpler steps.
The loop runs on the model’s judgment, not hardcoded rules. Strands gives the agent a prompt and a list of tools — write file and run pytest — and lets the model decide what to do next and when to stop. There’s no “if tests fail, fix code” written anywhere. The model figures that out. The loop ends when the model returns a response with no tool call, or when a hard turn limit trips (set to 4 here; the happy path used 3, leaving one spare for a failing test).
Context re-sent every cycle is where tokens actually go. 3,697 tokens to produce a three-line function. The reason isn’t the function — it’s that the full conversation history, including the system prompt and every prior turn, gets resent to the model on each cycle. This is why each fresh request creates a new agent instance rather than reusing one. A cached agent would carry the previous spec’s entire transcript into that count.
None of this is ready to drop into a production pipeline — but that’s not the point of a POC. The point is to understand what the loop actually looks like when it runs, what drives the cost, and where the real constraints are. Those are the questions worth answering before you build anything serious on top.
For anyone leading an engineering team, the practical takeaway is specific: for bounded tasks with clear, testable success criteria — write this function, make these tests pass — agents can own the full loop cheaply. For anything requiring judgment about requirements, architecture, or tradeoffs, a human is still the necessary party. The value is in knowing which is which before you decide what to automate.
— Arvind, Rationale One short issue a week. Reasoning behind what’s changing in AI — no jargon, no hype.


