Why "Prompt Engineering" for Coding Agents No Longer Works

Why "Prompt Engineering" for Coding Agents No Longer Works

In the first week of May 2026, an event occurred that went almost unnoticed outside a small circle of developers. On April 30, OpenAI released Codex CLI 0.128.0 with a new primitive—a command for setting goals. On May 11, Anthropic added the /goal command to Claude Code v2.1.139. Within eleven days, the two leading players announced the same thing: the prompt is no longer the entry point. The entry point is the goal and the completion condition.

For those accustomed to writing long instructions and polishing phrasing, this is a blow. Prompt engineering, which was the primary skill for working with AI just a year ago, has turned into a relic. We break down what has changed and how to work with coding agents now.

What is loop engineering and why did it replace prompts

A prompt is a replica. You write an instruction, the model executes it, and returns a result. If the result is unsatisfactory, you write a new prompt. This is a linear process, and its main weakness is the lack of feedback within the execution itself.

A loop is a process with a completion condition. You set a goal, the agent formulates prompts itself, executes the task, checks the result, and repeats until it reaches the goal or hits an iteration limit. A replica is not enough—you need a process.

Boris Cherny, one of the creators of Claude Code, publicly stated in March 2026 that the entire tool is now written by Claude Code itself. Self-written code in the Anthropic codebase is a relic. The agent writes itself using loops, without human involvement in formulating prompts.

How loops work in Claude Code and Codex

In Claude Code, the /goal command starts a build-test-fix loop. You describe what the output should be, and the agent decides how many iterations it needs. Inside the loop, it writes code, runs tests, reads errors, fixes them, and repeats. You don't write a prompt for each iteration—you set the goal once.

In Codex CLI 0.128.0, the logic is similar, but with an emphasis on adversarial review—two agents must reach an agreement. One writes the code, the second checks it. If the reviewer finds a problem, the executor fixes it. The loop ends when both agree or when the iteration limit is reached.

On May 28, 2026, Anthropic released Dynamic Workflows—a mechanism where Claude writes an orchestrator script itself and launches up to 16 agents simultaneously, up to a thousand per execution. One developer refactored a 750,000-line project in 11 days, and 99.8% of the tests remained green. This is a level where you simply state the goal, and the agent decides for itself how many assistants it needs.

Three basic loops that work right now

If you are just starting to work with loops, here are three scenarios you can run without a single line of code:

  • Build-test-fix. Goal: "Write a function to parse JSON, cover it with tests, and ensure all tests pass." The agent writes the code, runs the tests, reads the errors, and fixes them until everything works.
  • Adversarial review. Goal: "Refactor this file, check with a second agent that the logic hasn't broken." One agent refactors, the second checks. If it finds a problem, the first one fixes it.
  • Morning digest. Goal: "Collect a list of new issues in the repository, filter out bugs, and generate a brief report." The agent traverses the API, filters, groups, and provides the finished text.

The main principle: the executor does not check its own work. The second agent is the reviewer. This reduces the number of missed errors.

What you need to define so the loop doesn't burn through tokens

A loop without an iteration limit is a way to burn your entire token balance overnight. The first thing you need to set is the maximum number of iterations. In Claude Code, this is the max_iterations parameter; in Codex, it is --max-loops.

The second is the completion condition. If the goal is formulated vaguely, the agent will loop infinitely. Instead of "improve the code," write "refactor the parse_data function, ensure all tests pass, and the linter doesn't complain." This gives the agent concrete stopping criteria.

The third is the context strategy. Local models, which can be connected via the --oss flag in Codex, often have a limited context window. If you are working with large files, the agent breaks them into parts itself, but for complex refactoring, manual configuration in the config file may be required.

How this changes the developer's work

Prompt engineering was a skill of formulation. Loop engineering is a skill of goal setting and process control. You no longer write instructions—you define what the output should be and set the boundaries.

For beginners, this is good news: you don't need to learn how to write perfect prompts. For those who spent months honing their phrasing—it's a blow. The skill was devalued in the two weeks of May 2026.

The main change is a shift in role. You are no longer the author of instructions. You are the architect of the process. The agent writes the prompts itself, checks itself, and fixes itself. Your task is to set the goal, limits, and completion conditions. The rest is its job.

Want to try loops in action? Both Claude and GPT-4 are available in GEMERA AI—you can run an adversarial review right in the chat or via API. Set a goal, define an iteration limit, and watch how the agent completes the task itself without manual prompt editing.