For a coding agent, the most useful context is not the longest possible context, but information that changes architectural decisions. This was demonstrated by an experiment involving the development of a text search service in Rust: context was added gradually over 24 steps, and after each step the extent to which the plan had changed was assessed.
Instead of evaluating the quality of the final code, the experiment measured the response to an intermediate artifact—plan.md. This approach made it possible to distinguish data that genuinely affects the course of work from repetitions and explanations that merely take up space in the context window.
How the impact of context was measured
The project used four files:
readme.md— project description;plan.md— current implementation plan;logqa.md— history of the agent’s questions and answers;influence.md— assessments of the impact of individual portions of context.
First, a technical specification was placed in the project, and the agent was asked to prepare a plan. Documentation for the API, corporate rules, repository examples, clarifications, and audit results were then added sequentially. A five-point scale was used for each step.
| Score | Interpretation |
|---|---|
| 1 | The plan requires no changes |
| 2 | Cosmetic edits or renamings are needed |
| 3 | There are minor changes without new sections |
| 4 | Significant changes and new sections appear |
| 5 | New sections and alternatives emerge, requiring a person to choose between them |
The strongest context is found within the team
Two sources received the highest score: corporate rules and real development examples. After studying the rules, the plan included requirements for observability, deployment, repositories, and testing. At the same time, questions emerged that could not be reliably resolved using the general technical specification: whether to choose REST/JSON or gRPC/proto, determine the exact repository names, and decide whether Helm, Kubernetes, and a separate proto repository were needed immediately.
Examples from internal projects proved no less important. The agent discovered that the team uses redup-servicekit rather than an independently assembled observability stack. As a result, the technology decisions changed: a YAML configuration appeared, proto became a Git submodule, build.rs was added, and Dockerfile, Jenkinsfile, Helm, Kubernetes, and CRD-format dashboards were included in the plan.
These are precisely the kinds of data that an agent cannot infer from an abstract technical specification. They describe not only the required result, but also the real constraints of a specific organization.
What had less impact
The Yandex Search API v2 documentation received a score of 4: it clarified that WebSearchService was being used, added work with Operation, decoding of rawData using the Base64 → XML scheme, and a limit of 250 results. quick-xml and base64 were also added to the stack.
However, a subsequent live request to the endpoint had a weaker impact—a score of 3. It confirmed the /v2/web/search address, Api-Key authorization, and the actual XML structure, but did not change the overall architecture. The same category of information provides different value depending on the timing: an early unknown changes the plan more than a later verification of an already adopted decision.
Questions about the version of the redup-servicekit dependency, the list of remaining decisions, and repeated control audits received a score of 1. After corrections, the agent confirmed several times that there were no new significant problems, but the structure of the plan did not change as a result.
Summary of the results
| Type of information | Score | Result |
|---|---|---|
| Team rules and internal repositories | 5 | New sections, alternatives, and questions for a person |
| Technical specification, external API documentation, stack selection | 4 | Significant detail and restructuring of the plan |
| Live API checks and recording names | 3 | Closure of individual open questions |
| Formatting and renamings | 2 | Minor changes without a change of direction |
| Repetitions and confirmation of decisions already made | 1 | The plan remains practically unchanged |
How the plan changed during the code audit
The experiment included not only planning but also execution. After the command “execute plan.md,” the agent created proto, a Rust service, tests, Dockerfile, Jenkinsfile, Helm, and Kubernetes artifacts.
The first audit found a critical error: sync_url() appended /search to an endpoint that was already complete, causing the synchronous mode to return 404. Problems with timeouts, async-mode emulation, identifier removal, limiting the number of asynchronous results to 1024, and the response size to 16 MiB were fixed later. No significant defects or regressions remained during the final control cycle.
Practical rules for working with an agent
- Keep the technical specification in the project file. This reduces the burden of correspondence and allows the agent to return to the original text.
- Provide team rules and internal examples early. They have the greatest impact on the architecture and prevent rework.
- Separate facts from decisions. API documentation explains how an external system works, but corporate agreements must be confirmed by a person.
- Record open questions. After choosing REST or gRPC, repository names, and configuration parameters, the decision should be recorded in the plan immediately.
- Do not duplicate what is already known. A repeated audit or retelling of a source provides no value if it does not change a single decision.
- Use verifiable data instead of assumptions. A live API response is more valuable than a guess about its format.
Why a score of 5 is not a sign of failure
The highest score means that the agent has discovered the boundary of its authority. If a choice depends on security policy, team agreements, or the structure of the infrastructure, the model should formulate the options and pass the decision to a person rather than choose a path at random.
Good context does not remove people from the process; it helps them see more quickly exactly where their decision is required.
In the experiment under consideration, the user’s clarifications resolved the forks, and the plan became more specific. This produced a workable scheme: the agent identifies the unknown, the person records the rule, and the agent then continues implementation.
Limitations of the experiment
The results cannot be considered universal statistics. The observation was conducted on a single task—the development of a Rust service—in a single corporate environment. The assessments were also not independent, and the impact was measured by changes to the plan rather than by the quality of the finished product.
Nevertheless, the general conclusion is practical: an agent should be given information that opens up new decisions or changes existing ones. Anything that merely repeats what has already been confirmed is better kept outside the active context.
AI · AI agents · AI model · agent application