OpenAI Engineers Share Top 4 Tips for Getting the Most From Code Agents
When it comes to AI, the best usage tips often come from those who build the tools. At DevDay Exchange, OpenAI's developer event held in Paris at the end of October, several team members shared their best practices for working with Codex. JDN was there and picked out four key takeaways that can truly improve your day-to-day use.
Set a Verifiable Goal
Code agents are just LLMs running in a loop. To maximize productivity, OpenAI added the /goal command to Codex, allowing an agent to keep working until its task is fully complete. The goal is stored outside the agent's context, by the harness (the program that manages the model). This way, work continues even after several context compactions (automatic summaries). "The model decides where it stands in relation to the goal. If it thinks more work is needed, it keeps going. If it believes it's done enough, it ends its turn," explains Pranav Deshpande from OpenAI's developer marketing team.
But to use the command effectively, you need to clearly state your expectations. In your /goal command, specify both the overall objective and the success criteria that will end the loop. For example: "/goal Migrate the payment module to the new API. The task is complete when all tests pass and there are no remaining calls to the old API."
Run Multiple Agent Teams in Parallel
The toughest coding or technical problems can now be solved with AI agents. Sometimes, you need full teams of agents to tackle the most complex challenges. That was the case with Navier-Stokes, which OpenAI solved using several agent teams, each instructed to use radically different approaches. That's tip number two. For difficult tasks, OpenAI recommends following this example and using agent teams with "different problem formulations."
Agent teams should then be encouraged to communicate and share their results. The goal? To avoid duplicate work at all costs, "because at this scale, it can be very expensive, both in time and tokens," reminds Pranav Deshpande. Finally, when results raise new questions, new teams are created and existing ones are redirected toward the most promising leads.
But this approach should be reserved for only the most complex problems. For everyday work, "it's better to start with a single agent, giving it a clear task and a way to check its work," explains Dominik Kundel from OpenAI's developer experience team. He also advises against assigning roles to agents: it's better to let the orchestrator model organize things on its own.
Avoid the "Middle Management Tax"
Don't overload your code agents with a long list of rules and requirements. Even if they won't rebel, piling on rules ("you must do this," "never write that," etc.) can bog down your daily workflow. With too many rules, agents can get stuck, "because they're trying to figure out the right validation chain to follow. I call this the middle management tax," says Dominik Kundel. It's better to take inspiration from effective management: keep rules simple, clear, and few in number. "Try not to overthink micro-managing all your agents, because it's usually not worth it," he adds.
Instead, describe the expected result and the success criteria (see point one). Before adding a new interaction rule, ask yourself what observed problem it's meant to fix. If there isn't one, don't add it. And if agents seem stuck, first check if a rule is the cause and remove it.
Throw Out Your Workflows with Every New Model
This is probably the best and most counterintuitive advice on the list: forget everything you've learned so far, including the tips in this article. Not today, but every time a new model is released. The field evolves week by week, sometimes even daily, and yesterday's best practices can become obsolete overnight. "All best practices have an expiration date. So don't get too attached to the workflows you've built," sums up Dominik Kundel. In recent months, new models have become increasingly independent. The harness's guides and rules are becoming less and less essential.
With each new model release, Dominik Kundel recommends deleting all previous workflows (skills, plugins, hooks, etc.) and only bringing them back if you truly miss them in your daily work. OpenAI applies the same logic to its own tool: when a new model comes out, some Codex features are often removed. On one hand, because the model no longer needs that crutch, and on the other, to avoid complicating the agent loop. Pranav Deshpande sums it up: "With AI, sometimes you have to set aside what you thought worked and start from scratch."
This article was automatically translated from French. Read the original version: https://www.journaldunet.com/intelligence-artificielle/1558391-agents-de-code-les-4-meilleurs-conseils-des-ingenieurs-d-openai/