Habr AI→ original

Claude Code and Codex Are Changing the Rules: Prompts Give Way to Context Engineering

Prompt engineering in agentic IDEs is no longer the primary quality factor. A detailed analysis of Context Engineering explains that in Claude Code, Codex…

AI-processed from Habr AI; edited by Hamidun News
Claude Code and Codex Are Changing the Rules: Prompts Give Way to Context Engineering
Source: Habr AI. Collage: Hamidun News.
◐ Listen to article

On Habr AI, a major breakdown about Context Engineering was published, and its main thesis is extremely practical: in agent tools like Claude Code, Codex, and Cursor, the quality of results now depends not so much on the wording of the request, but on the entire environment around the model. The user's own text takes up a tiny fraction of the context, while decisive influence comes from the system prompt, project instructions, memory between sessions, tools, dialog history, and tool call results. In other words, the era of the "magic prompt" is ending, and context engineering is taking its place.

The key idea revolves around the nature of the context window. It is proposed to be perceived as the model's desk: the more random papers on it, the worse attention is distributed across truly important signals. Long context is not just more expensive.

It reduces quality due to two effects. The first is context rot, when attention becomes spread out, the model begins to forget earlier constraints, gets stuck on old points, and gives more vague answers. The second is reasoning shift: as context grows, part of the computational resource goes into processing the input rather than reasoning, so the answer can sound confident but be less well-justified.

The article provides an estimate that long context can unexpectedly cut the depth of reasoning by up to 50 percent. Why this happens, the author explains through Transformer architecture. Attention in basic form has quadratic complexity O(n^2): each token must be related to each other.

Therefore, adding documents, files, and long correspondence scales the cost not linearly, but quadratically. In practice, this hits all four parameters at once: response speed, cost, limits, and accuracy. Hence the main thesis: good context engineering is not "cram everything into the model," but select the minimal set of high-signal tokens that maximizes the chance of the desired result.

Further, the material discusses what context is made up of in agent systems. Beyond the model weights themselves, there are at least several manageable layers: system prompt, project files like CLAUDE.md or AGENTS.

md, memory about the user and project, skills with ready-made processes, MCP integrations, specifically loaded files, and the entire tool_result history. Separate emphasis is placed on the fact that the model doesn't "remember" the conversation by itself: the harness reassembles and resends the history to it each time. Because of this, every unnecessary tool description, every unused MCP server, and every long system file begin to eat up tokens many times over.

To save tokens, prompt cache, deliberate compact, new sessions via clear, and isolation of heavy research in subagents are needed, so the main agent receives not mountains of intermediate data, but a short summary. The most practical part concerns the cost of agent mode. One request to an agent may not be a single call to the model, but a whole chain of several calls with tool use.

In the example of analyzing a failed deployment, one user message becomes four model calls and three tool executions. Without caching, such a cycle quickly becomes economically pointless; with prompt cache the price drops sharply, but even then it's important to remember that output tokens and hidden thinking cost more than regular input, and long tool definitions and system instructions end up in each round. Hence the author's conclusion: a master is not distinguished by writing more clever prompts, but by assembling a reproducible environment once — with project rules, memory, relevant tools, and processes — and then making the agent work according to this contract.

For the AI development market, this is an important shift. Competition is less and less about beautiful query wording and more and more about the quality of context assembly, token discipline, and engineering of the agent environment. Teams that learn to manage memory, tools, and history as carefully as they once managed prompts will get not only more accurate answers, but also predictable costs.

This means the next stage of AI tool evolution will be determined not by the magic of the prompt, but by the architecture of the context.

ZK
Hamidun News
AI news without noise. Daily editorial selection from 400+ sources. A product by Zhemal Khamidun, Head of AI at Alpina Digital.

Want to stop reading about AI and start using it?

AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.

What do you think?
Loading comments…