Agentic Programming at Ten-Million-Token Scale: Capabilities, Limits, and Reliable Delivery
Large token budgets can expose problems that single-turn question answering does not reveal: goal drift, failure to revise plans based on execution results, and changes in cost and stability as context grows. But token consumption is not a quality metric. This article examines three progress areas for agentic programming—long-horizon task organization, feedback-driven correction, and context reuse for cost control—while discussing overanalysis on simple tasks, workflow safeguards, and an evaluation framework based on verified delivery rather than runtime or token volume.
1. From Continuous Running to Reliable Delivery
In large-model applications, usage at the ten-million-token scale can expose problems that are difficult to see in single-turn Q&A: whether the model drifts from the goal, whether it can revise a plan based on execution results, and how cost and stability change as context keeps growing.
But consumption scale is not a quality indicator. A large number of tokens may be used to complete complex engineering work, or wasted on repeated analysis, ineffective tool calls, and error repair. When evaluating an agent, three questions should come first: What did it complete? How can the result be verified? How many resources did it consume?
The case material describes a class of autonomous coding tasks that run for nearly an hour, involving complex reasoning, mistakes on simple problems, and caching costs. These observations can serve as case clues for discussing general technical issues, but they are not enough to form a direct model capability ranking. The material does not provide complete run logs, uniform test conditions, or repeated experiment results. A more valuable approach is to extract the engineering patterns and establish reusable evaluation and delivery methods.
From this perspective, agentic applications have three notable directions of progress: long-horizon task organization, correction driven by execution feedback, and cost optimization through context reuse. A counterintuitive phenomenon accompanies them: a longer reasoning process may make simple tasks more likely to drift from common-sense constraints.
2. First Progress Area: Complex Requirements Can Be Decomposed into Executable Engineering
1. The core of agentic programming is not generating more code
Traditional code completion mainly handles local problems, such as completing a function or explaining a piece of logic. A long-horizon agent needs to take on a more complete work chain:
Requirement understanding → solution design → task decomposition → file modification → test execution → error localization → fix verification → delivery summary.
The difficulty lies in maintaining state consistency. The model must know which tasks are complete, which changes have not been verified, and which modules are affected by a local change.
Consider a bookkeeping system. “Support recording income and expenses and viewing statistics” looks simple, but it actually involves data models, input validation, query rules, UI interaction, and permission boundaries. If the agent simply generates pages one by one, the pages may look complete while the data logic contradicts itself.
2. Define business invariants before arranging development order
A bookkeeping scenario can be abstracted into core entities such as accounts, categories, and transactions. What really affects correctness is not the number of data tables, but the constraints the system must always satisfy:
- Every transaction must be associated with a valid account.
- Amounts should use a representation suitable for precise calculation; binary floating point should not be used directly for financial amounts.
- Income, expense, and transfer should have clear semantics and should not be distinguished only by UI text.
- After a category is deleted, the handling rule for historical transactions must be deterministic.
- Statistics should use the same time and filter criteria as detail queries.
- Multi-user scenarios must guarantee data isolation.
These constraints should be written into an acceptance checklist before development, rather than added later after problems appear.
Task decomposition should also follow dependencies. A reasonable order is usually to define data structures and business rules first, then complete read/write logic, then connect the UI, and finally verify complete business paths. If the UI and data layer are developed in parallel, the data contract between them should be agreed upon first to avoid inconsistent field meanings and error handling.
3. “Running for an hour” must become checkable progress
Continuous execution time can show that the agent did not stop immediately, but it does not prove that the work was effective. What is more meaningful is recording the evidence produced at each stage:
| Stage | Evidence to retain | Main acceptance question |
|---|---|---|
| Requirement analysis | Assumptions, scope, and open items | Was the business goal misunderstood? |
| Data design | Entity relationships and constraint descriptions | Are there consistency gaps? |
| Feature implementation | Change records and feature list | Were critical paths missed? |
| Test verification | Test results and failure reasons | Are business rules actually covered? |
| Final delivery | Usage instructions and known limitations | Can others reproduce and maintain it? |
This is how to distinguish a “busy agent” from an “effective agent.”
3. Second Progress Area: Feedback Loops Make Autonomous Correction More Valuable in Engineering
1. Correction depends on external evidence, not self-affirmation
An agent claiming that it “has fixed” something is not valid evidence. Credible correction should be based on observable results, such as test failure information, runtime exceptions, data query results, and permission check records.
A basic loop can be represented as:
Read the current task and acceptance conditionsImplement one verifiable changeRun the corresponding checkIf the check fails:Save the error informationDetermine the cause and propose a fix hypothesisRecheck after the changeIf the check passes:Update task statusMove to the next task
The key is “one verifiable change.” If the model changes many unrelated files at the same time, it becomes difficult to locate the cause of a failure, and subsequent fixes may introduce new problems.
2. Prevent “changing the goal to pass the test”
A risk that is easy to overlook in autonomous programming is that the model may restore an apparently normal result by deleting assertions, weakening validation, or modifying expected test results. This does not mean the business problem has been solved.
Acceptance criteria should therefore be separated from the implementation process. Important business tests should preferably be constrained by independent rules. Changes involving test files, permission logic, or data migration should be reviewed separately. For critical paths such as financial calculations, identity checks, and data isolation, relying only on tests generated and self-verified by the model is not sufficient.
3. Set explicit stop and escalation conditions
The stronger the autonomy, the more constraints are needed. Otherwise, the model may keep consuming resources through repeated failures or even perform high-risk operations.
The following principles can be used:
- When the same error recurs without new evidence, pause the fix and re-localize the problem.
- Require human confirmation for data deletion, permission expansion, or production environment changes.
- Handle tool exceptions separately from business errors to avoid mistaking environment failures for code defects.
- After reaching time, call-count, or cost budgets, output the current status and blocking reasons.
- Keep a recoverable checkpoint at each stage to avoid restarting from scratch after a failure.
These are workflow design principles, not guarantees that a particular model naturally provides.
4. Complex Reasoning: A Longer Process Does Not Mean a More Stable Conclusion
1. Different tasks require different verification methods
Logic Q&A, mathematical proofs, and engineering troubleshooting all involve reasoning, but their success criteria differ.
Logic Q&A requires checking whether conditions are consistent and whether multiple reasonable interpretations exist. A mathematical proof requires every step to be justified and boundary conditions to be handled. Engineering troubleshooting depends on experimental results to determine whether a change eliminates the fault without introducing regressions.
Therefore, one cannot infer that a model will reliably solve high-difficulty mathematical problems just because it is good at certain logic puzzles, nor should a fluent explanation be treated as a correct proof.
2. Repetitive reasoning may be a signal of losing control
When a model repeatedly discusses the same assumptions on a difficult problem, it is sometimes not “deep thinking” but a lack of effective progress. Common signs include:
- Restating the problem multiple times without producing new constraints.
- Cycling between several unverified assumptions.
- Continuing to use the original conclusion after discovering a contradiction.
- Using longer explanations to cover missing key steps.
When handling such problems, the model should be required to list known conditions, the conclusion to be proved, and current uncertainties explicitly, and then choose steps that can be independently verified. Parts that can be checked by calculation should be checked in a controlled execution environment. For conclusions where counterexamples can be constructed, counterexample search should be attempted first.
External verification can only cover its applicable scope. Verification on a finite sample cannot replace a general proof, and successful program execution cannot prove that all inputs are correct.
5. An Unexpected Finding: Simple Tasks Can Be Misled by Overanalysis
1. Common-sense goals matter more than the surface form of the question
For example, a user asks whether to walk or drive to a nearby car wash. If the goal is to wash one’s own car, the vehicle needs to be present. This business constraint is more critical than distance.
If the model first produces a long analysis of energy savings, walking convenience, and distance without recognizing that “the object being washed must arrive on site,” it may reach a conclusion that looks reasonable but is not actually applicable.
This failure cannot necessarily be attributed only to “thinking too much.” It may also come from goal recognition errors, missing conditions, or ambiguous prompt wording. Rigorous evaluation should repeat tests with different phrasings to determine whether the problem occurs consistently.
2. Set a shorter decision path for simple tasks
A suitable process for lightweight tasks is:
- Confirm what the user actually wants to accomplish.
- Identify the key constraint that determines the answer.
- Give a direct conclusion.
- Add conditions or ask follow-up questions only when there is substantive ambiguity.
Complex tasks can consume more analysis resources, but simple Q&A should not start long-horizon planning by default. A real system can choose different processing paths based on task risk, number of dependencies, and verification needs.
Note that path selection itself can also be wrong. Therefore, for high-impact issues involving finance, permissions, or security, difficulty should not be judged only by “question length,” even when the wording is short.
6. Third Progress Area: Context Reuse Helps Control Long-Task Costs
1. Cost is not only output tokens
The overhead of a long-horizon agent usually includes input context, model output, tool execution, failed retries, and final human review. As a task progresses, historical messages, code snippets, and logs accumulate continuously. Resending the same content may become a major burden.
If the service used supports context caching, the cost of repeatedly processing stable content may be reduced, but the actual benefit depends on cache scope, hit conditions, validity period, and billing method. It cannot be assumed that all repeated input will automatically receive a discount.
A general cost structure can be written as:
Total cost = input processing cost + output generation cost + tool execution cost + retry cost + human review cost.
For actual procurement and operation decisions, the cost per accepted task should also be calculated, rather than comparing only the unit token price.
2. Caching and context governance should proceed together
Caching addresses repeated processing, while context governance addresses information redundancy. The two are not equivalent.
More reliable practices include:
- Organize stable specifications, project structure, and acceptance requirements separately from dynamic logs.
- Provide only the files and snippets required by the current task.
- Generate structured summaries for completed stages while retaining raw evidence for traceability.
- Remove duplicate error reports, but retain the first failure, key fixes, and final results.
- When requirements or permission rules change, update the relevant context promptly to avoid reusing outdated information.
Summaries may also lose details. Important constraints should not exist only in an automatically generated summary; they should be stored in explicit task records or acceptance files.
7. Build an Evaluation System for Development Teams
To determine whether an agent is worth introducing into a real workflow, use a fixed task set and record consistent metrics:
- Acceptance pass rate: How many predefined conditions the completed result satisfies.
- Number of human interventions: At which stages humans must take over.
- Effective progress: How many verifiable tasks are completed, rather than how much code is generated.
- Regression defects: How many new problems are introduced during fixes.
- Tool-call effectiveness: Whether calls produce useful evidence or actual progress.
- Cost per delivered task: Total resources required to complete one task that passes acceptance.
- Safety boundary compliance: Whether the agent attempts to exceed authority, delete critical data, or bypass checks.
During testing, fix the task description, initial project state, tool permissions, and budget, and run multiple times. In addition to average performance, pay attention to worst-case results and failure modes. For enterprise applications, one uncontrolled data operation may affect a launch decision more than many ordinary task successes.
8. Conclusion: Autonomy Must Grow Together with Verifiability
The value of agentic programming lies in connecting requirement decomposition, code modification, test execution, and error repair into a continuous process. Its capability boundaries are reflected in goal persistence, reasoning stability, recognition of simple constraints, and resource control.
Development teams should not pursue only longer continuous runtime, nor should they treat more reasoning tokens as higher quality. A more reliable path to deployment is to define business invariants and acceptance criteria first, then build feedback loops, permission boundaries, and stop conditions, and finally measure efficiency by cost per delivered task.
A truly adoptable agent workflow is not merely one that can “work independently.” It should provide completion evidence, explain blockers when it fails, and always keep results checkable, the process recoverable, and risks controllable.
