Can AWS Bedrock Make Agentic Coding Reliable?
The first two stages of this experiment answered two important questions. In Stage 1, I learned that running a coding agent completely locally on my M2 MacBook with 16 GB of memory was possible, but the models I could realistically run were not reliable enough for autonomous work. In Stage 2, I moved the model to rented GPUs using Modal and tested larger models, including Qwen 2.5 Coder 32B on an A100. The models improved considerably, but I traded local hardware limitations for GPU memory limits, cold starts, infrastructure complexity, and hourly costs.
Stage 3 changes the approach again. Instead of running the model myself, I use a managed model through AWS Bedrock and pay for inference by token. The source code, Git repository, IDE, tests, and agent remain on my computer, while AWS handles the model infrastructure.
The main question is no longer simply whether a larger model writes better code. I want to know whether this combination can finally behave like a useful coding agent.
Moving to a much larger model
For this test I use Qwen3 Coder 480B A35B through AWS Bedrock. The model has 480 billion total parameters, while approximately 35 billion are active for each token because it uses a Mixture-of-Experts architecture. The important difference for me is that I no longer have to figure out how to fit this model into one or several GPUs.
The first Bedrock request is intentionally simple:
Reply with exactly: Bedrock connected successfully.
The response comes back correctly using only 17 input tokens and 6 output tokens. Bedrock itself is straightforward, but we need to connect it to an agent.
I start with Aider because I already used it in the previous stages, making it a useful comparison point. Aider successfully reads the project, understands the architecture, identifies the correct transaction classes, and explains how the new endpoint should work. The reasoning looks significantly better than what I saw from the smaller models.
Then I ask it to implement the feature.
It fails. Badly.
Instead of adding a few methods, it removes existing controller endpoints, deletes repository methods, and reduces a service with more than 250 lines to roughly 50. Some existing business logic is replaced by placeholders. The model understood the requirement, but the resulting edits were unusable.
This changes how I look at the problem. I have now tested models from 7B to 480B total parameters, yet increasing model capability alone has not solved the editing problem.
The agent matters too.
Switching from Aider to Junie
I used Junie briefly during Stage 2, but it had trouble communicating reliably with the self-hosted model. With Bedrock, I decide to try again.
Junie cannot directly use this Qwen Bedrock setup the way I need, so I install LiteLLM, a small proxy that translates Junie's OpenAI-compatible requests into calls Bedrock understands:
Junie
↓
LiteLLM
↓
AWS Bedrock
↓
Qwen3 Coder 480B A35B
Even this requires some adjustment. Junie sends parameters such as seed and a stop sequence that this Bedrock model does not support, so I configure LiteLLM to remove them before forwarding the requests. Once those compatibility issues are resolved, Junie starts working normally.
I first repeat the project-discovery tests. Junie understands the Controller → Service → Repository architecture, authentication through the logged-in user, the transaction model, and the existing repository conventions. It makes one questionable assumption while analyzing the feature, but corrects it when the actual implementation requirements make the expected behavior explicit.
Then I ask it to implement the endpoint.
A much better result
The first requirement is a GET /transactions/range endpoint that accepts startDate and endDate, preserves user ownership filtering, queries the database instead of filtering in memory, and follows the existing project architecture.
Junie changes exactly the three files I expect: the controller, service, and repository. It adds the endpoint, the service method, and the repository query while leaving the existing code untouched.
I then make the requirement more complicated. Both dates become optional:
| startDate | endDate | Result |
|---|---|---|
| Provided | Provided | Between the two dates |
| Provided | Missing | On or after the start date |
| Missing | Provided | On or before the end date |
| Missing | Missing | All transactions |
Junie modifies the existing implementation correctly and keeps all filtering in the database. It adds a few comments that I would normally remove because they only explain obvious branches, but this is a minor review issue rather than a broken implementation.
Next I ask it to write the service tests following the existing testing conventions in the project. It creates tests for all four combinations and runs the relevant test class.
All 20 tests pass.
Can it debug its own code?
To test the debugging loop, I manually introduce a small bug. The branch that should retrieve transactions on or before an end date now calls the repository method for transactions on or after the date.
I do not tell Junie where the problem is. I only say that a TransactionService test is failing and ask it to diagnose and fix the underlying issue.
Junie finds the failing test, traces it to the incorrect repository call, changes one line, and runs the tests again.
All 20 tests pass.
This is much closer to what I expect from an agent: inspect the evidence, identify the problem, make a focused change, verify it, and stop.
A complete agentic loop
For the final test I make the feature larger. I ask Junie to add an optional accountId to the same endpoint. When an account is provided, transactions should also be filtered by that account. The two dates remain optional, the user ownership rule still applies, and Junie is responsible for updating the tests and verifying the result.
This time I give it less procedural guidance because I want to see whether it can manage the complete workflow itself.
Four minutes later, the implementation is complete and all 25 tests pass.
The final change touches the controller, service, repository, and service tests. I find one unused repository method and some unnecessary comments during review, so the result is not perfect. However, those problems are small enough to become future harness rules, for example:
Do not add comments that only repeat what the code already says.
Review every newly added method before finishing and flag methods that are not directly used.
At this point I am reviewing the agent's work instead of repairing it.
What did the feature cost?
AWS CloudWatch gives me the actual token usage generated by Junie during the experiment:
Input: 3,496,969
Output: 25,710
Total: 3,522,679 tokens
Part of this includes initial setup and project discovery. Looking only at the three later usage blocks that roughly correspond to implementing, modifying, testing, debugging, and extending the feature, the total is approximately:
Input: 2,965,791
Output: 21,430
Total: 2,987,221 tokens
So this feature consumed roughly 3 million tokens.
My current estimated Bedrock cost is around $0.69–$1.37 USD for the feature work, or $0.82–$1.62 USD including the initial Junie setup and context. I am keeping this as a range until AWS Cost Explorer shows the actual billed amount.
The interesting part is where those tokens went. Almost all of them are input tokens. Junie repeatedly sends project context, instructions, tools, history, and internal agent information to the model. The Java code generated by the model is only a tiny part of the total consumption.
Aider provides an interesting contrast. Its Bedrock tests consumed only around 37,000 tokens, but its implementation failed. Junie consumed vastly more context, but completed the work.
For me, this makes cost per successfully completed task much more useful than cost per million tokens.
Three stages, three different problems
The experiment has changed significantly across the three stages:
| Stage | Approach | Main limitation |
|---|---|---|
| Stage 1 | Local models | Hardware, model size, and context |
| Stage 2 | Remote self-hosted models | GPU memory, cold starts, infrastructure, and agent reliability |
| Stage 3 | Managed model through Bedrock | Context efficiency and agent harness quality |
Stage 1 showed me that a completely local coding environment is possible, but my hardware limits how capable the model can be.
Stage 2 removed that constraint but introduced a new infrastructure problem: I was effectively becoming the model hosting provider for my own coding agent.
Stage 3 is the first experiment where the complete workflow works close to how I originally imagined it. The agent implements a feature, modifies it, writes tests, runs them, diagnoses a bug, and completes a broader requirement with less guidance.
There is still human review, which I consider necessary anyway, but I am no longer reconstructing broken work after every task.
The next problem is the harness
This experiment also required a surprising number of tools and configurations along the way: Ollama, several local models, Aider, Junie, Modal, vLLM, LiteLLM, AWS CLI, Bedrock configuration, and multiple agent configuration files.
That was useful while learning how everything fits together, but I do not want my normal development workflow to remain this complicated.
The next stage is therefore less about finding an even larger model and more about making the system around the model reliable and repeatable. I still need to decide whether Junie remains the agent, whether I test other tools or VS Code integrations, and how much of this setup can be simplified.
I also need to improve the prompts and context. Most prompts in these experiments were deliberately structured with help from ChatGPT so that I could create controlled tests. Real development requests are not always written that way, so I need to learn which prompt structures work consistently when I describe tasks naturally.
Finally, each project needs a better-defined harness: architecture rules, testing expectations, permissions, Git behavior, context selection, and checks such as avoiding unnecessary comments or flagging unused code.
At the beginning of this experiment I was mostly asking how large the model needed to be.
After Stage 3, the model is no longer the most interesting part.
The harder problem is building a good system around it.