interacting with coding brokers reminiscent of Claude Code and Codex. They’ve huge advantages in growing the pace at which I can get issues carried out as an engineer.
There are quite a few bottlenecks that I’ve skilled now that coding has grow to be commoditized and we are able to write extra code so much sooner with Claude Code and Codex. I’ve coated a few of these bottlenecks earlier than, in earlier articles, with matters reminiscent of:
- Reviewing code
- Deciding what to work on
Nevertheless, there’s a third one which I’ve positively skilled increasingly points with, and I spent a whole lot of time considering via how you can optimize, and that’s how you can align my intent with Claude Code now that I spin up so many periods.

After I say aligning my intent with Claude Code, what I imply is that Claude Code understands precisely what I need to implement and that Claude is thus in a position to make a whole lot of assumptions about how the implementation needs to be carried out. Basically, Claude ought to perceive what I need to implement and implement it as precisely as attainable in order that after I overview the work afterward, I decrease the quantity of stuff now we have to tweak.
Why alignment is so essential
As normal, I prefer to cowl why the subject I’m protecting is so essential. The explanation alignment with Claude Code or coding brokers basically is so essential is that in case your intents should not aligned together with your coding agent, the coding agent is not going to implement what you count on it to implement or what you need it to implement.
A disconnect can, for instance, take form with the mannequin not implementing the design as you need, not having the right logic within the function it’s implementing, and lots of different issues.
Basically, it boils all the way down to the truth that it now takes you, the human, extra time to finish the duty. As a result of while you spun up the duty, you tried to share with the coding agent what you needed to implement, and if you weren’t aligned, the agent carried out the incorrect factor or carried out one thing incorrectly. On this state of affairs, you needed to go in, overview the agent’s work, give suggestions on what it did incorrectly and how you can do it appropriately subsequent time, after which this course of may need to proceed for a number of extra rounds till the agent has really managed to implement what you needed initially.
Not being aligned together with your coding agent prices a whole lot of time.
And as you already know, time has now grow to be much more helpful, now that we are able to construct much more stuff in a shorter period of time, which is why it’s important to shield it as a lot as attainable. And that is the rationale that it is best to spend time optimizing how properly you align together with your coding agent. I’ve tried a whole lot of completely different strategies and exams to see how you can align finest with my coding agent to make it full work as successfully as attainable, with a minimal quantity of human interference.
The way to align together with your coding agent
Now let’s dive into how you can align together with your coding brokers. On this part, I’ll cowl just a few completely different strategies, although I’ll spend more often than not optimizing the only only method that I discovered to align with my coding agent and to grasp its understanding of my duties. First, nonetheless, I’ll cowl some smaller strategies you should use to enhance alignment together with your coding agent.
Plan mode
Plan mode is the very first thing you are able to do. Plan mode is basically the place you will have the agent do a read-only sweep of the repository and make a plan on how you can implement the function that you just’re requesting. The benefit of plan mode is that the agent will now spend time asking you inquiries to ensure that it understands you appropriately.
Having the coding agent ask you questions is a superb method to enhance alignment. As an alternative of you having to ask the agent questions on how you can do issues or the way it understands issues, it is best to have the agent ask you questions, which is way faster so that you can reply and is general a more practical method to enhance mannequin alignment.
Nevertheless, generally I don’t use plan mode for smaller duties. I don’t assume it’s essential in a whole lot of instances as a result of I imagine I could make my preliminary immediate clear sufficient that the mannequin and the agent don’t want planning or question-and-answer, and yeah, I feel it’s largely essential for bigger points or duties that you just’re engaged on.
Detailed prompts
The second method I need to cowl is to make the immediate you present your coding agent detailed. You need to attempt to embody as a lot context as attainable. And this may be carried out in 2 most important methods. One is that, of, you attempt to bear in mind context your self and clarify it in your immediate. I feel it’s value noting right here that the size of your immediate doesn’t actually matter, you shouldn’t fear about including an excessive amount of textual content, as extra context is normally merely higher. The second is that it is best to add context from completely different sources. So, for instance, an excellent supply is perhaps a Slack message, which additionally contains some screenshots which might be related for an implementation, or a Notion data base that it is best to have in mind, and so forth. You need to feed as a lot information as attainable, for instance, it is best to make certain the coding agent has entry to all of those sources and inform it to make use of them actively throughout implementation and analysis.
Typically, for instance, I even make the prompts utilizing a separate coding agent. So I make a separate coding agent current me with an in depth immediate for precisely the duty I need to implement, which is mainly like a pre-work agent and helps me make a lot clearer and extra detailed prompts that embody solutions to a whole lot of the questions a coding agent may need if I didn’t put together the immediate like this beforehand.
The best method for mannequin alignment
Telling the mannequin “is my understanding right:
The explanation this system is so highly effective is that you just’re placing the questions within the arms of the coding agent so that you don’t must provide you with the query your self. This comes again to the purpose I made earlier on this article: you need the coding agent to ask you questions and never the opposite approach round.
I’d say that utilizing this system of telling the mannequin: “is my understanding right”, has 2 most important advantages:
- It’s a great way so that you can perceive all the issues the coding agent is engaged on.
- The coding agent will get to learn and perceive your perspective and might inform you in case your understanding is incorrect in any approach or if it’s totally right or partially right. This ensures that you’ve a whole understanding of every part that’s being carried out, and it makes it tremendous straightforward for the coding agent to level out the place your understanding is wrong so as to right it. In fact, after which you may, in fact, right it with the assistance of a coding agent explaining it to you.
The choice is to let the coding agent clarify every part it did after which confirm it your self. It presents some work that it’s carried out, you may take a look at whether or not the function or bug that it fastened was carried out appropriately, and also you come again to it. The issue, nonetheless, is that you just don’t acquire a full understanding of every part the coding agent did. Sure, you may test the surface-level implementations by, for instance, clicking across the app and simply attempting to breed the bug and see if it’s being reproduced, however you don’t have that full understanding of every part the coding agent did, or at the very least you may’t confirm that you’ve that full understanding.
Now I need to give an instance from a particular job that I’ve been engaged on. I used to be implementing an app the place I can have a Vercel web site, which makes it in order that I can entry my coding brokers from any location, for instance, my cellphone or my Mac. And it makes it tremendous straightforward for me to find which coding brokers want enter and which of them can proceed working. And I get a swipe performance in order that I can shortly undergo all of my coding brokers. That is mainly an app concept I considered to make it more practical to work together with all of my coding brokers as a result of I had a tough time having an summary of all of them after I began having 15+ brokers working at a time.
What I did was begin making a plan for implementing this function the place I defined every part, for instance:
I would like an utility, a Vercel utility, that I can entry from
each my cellphone and Mac, so it must be optimized for cellphone view
and PC view. And it ought to give me a straightforward overview of all my coding
brokers. It is crucial that I can see all my coding brokers from
that view, whether or not it is Codex or Claude Code. It ought to simply have the option
to find which coding brokers are working autonomously and thus do
not want any enter, and which coding brokers want enter from me, and it
ought to alert me in the event that they want enter from me. It must also use an LLM
to make the queries for me as simplified as attainable in order that I can, in
most instances, simply reply with one of many predetermined alternate options
and so forth.
I then let the agent make a plan and look into how you can construct it, and it began explaining the applying and so forth.
Later, I needed to grasp higher how the LLM system in my utility labored as a result of I wasn’t positive how the LLM understood which duties have been excellent, like which threads I needed to work on, and the way it understood the way it constructed the multiple-choice questions from the threads that had excellent work.
I thus prompted one thing like:
I wanna perceive the LLM system within the utility higher. Is my
understanding right? That the system works in order that now we have cron
job working each 10 minutes the place we then run a codex agent going
via all my threads. It identifies which threads are at present
working and which of them are stopped, after which out of those that
are stopped, it discovers if something is ready for enter from me
and discovers the duties that's ready for enter on and presents
them to me in a a number of alternative format. Is that understanding right?
The agent then defined to me that the system was not based mostly on a cron job, for instance, it was based mostly on a webhook system, and it defined that I used to be utilizing a Codex subscription and the Codex API key, and so forth.
Nevertheless, this was very key as a result of the agent additionally highlighted that a part of my understanding was right. Thus, I had totally aligned myself with the coding agent on what I used to be constructing, and we might begin constructing it as a result of I agreed on the implementation particulars.
I feel it’s additionally value including right here that making these explanations — like presenting my understanding of the system — is superb observe to raised perceive code. It helps you current your understanding of the state of affairs, and the LLM corrects it, which mainly helps you improve the way you work together with code. I’d additionally like to notice, although, that to a sure extent it positively requires a minimal degree of code understanding as a result of, in fact, it’s important to know the way completely different methods work to have the ability to describe them. However I positively assume that is one technique to study. You attempt to clarify it in addition to you may, and the LLM helps you each perceive it and clarify it higher over time so that you just’ll grow to be more adept working with code and thus extra environment friendly as properly.
Conclusion
On this article, I mentioned how you can successfully align your intents as an engineer with a coding agent. I described some completely different strategies that I exploit to ensure that my coding brokers and I are aligned, which I discover work very well. The most effective method I offered, nonetheless, which is by far the strategies that work finest for me to align with my coding brokers, is to inform the mannequin: “Is my understanding right?” after which current my understanding of an implementation or a repair. The LLM will then inform me whether or not I’m right, partially right or incorrect and current me a corrected response. I discover that this helps me make certain I perceive the code that’s being constructed and likewise helps me perceive what the LLM intends to construct based mostly on my prompts.
👉 My free eBook and Webinar:
🚀 10x Your Engineering with LLMs (Free 3-Day Electronic mail Course)
📚 Get my free Imaginative and prescient Language Fashions e book
💻 My webinar on Imaginative and prescient Language Fashions
👉 Discover me on socials:
💌 Substack

