Behind the 10-Million-Token Task: Capabilities and Boundaries of AI Agent Programming

    As large language models transition from simple Q&A to executing multi-step engineering tasks, evaluating their performance requires looking beyond single correct answers. Based on a massive agent programming task consuming over 10 million tokens, this article explores the capabilities and boundaries of AI agents in software development. We analyze how agents convert fuzzy requirements into executable plans, maintain goal consistency during long-running tasks, and handle the trade-offs between complex reasoning and simple task stability. Furthermore, we discuss establishing bounded execution environments, measuring real-world costs, and building a reusable evaluation system to achieve controllable, verifiable engineering delivery.

    I. Clarifying the Problem: What Are We Evaluating?

    When large language models begin to continuously call tools, modify code, and run tests, the evaluation target shifts from “whether a single answer is correct” to “a complete engineering execution process.”

    The original material describes a task experience consuming over 10 million tokens, covering autonomous programming, complex logical reasoning, simple situational judgment, and invocation costs. One accounting system task ran for about an hour, showcasing the potential of long-horizon tasks. However, these records lack a complete task set, environment configuration, repetition counts, and independent acceptance results, making it impossible to derive universally applicable performance conclusions.

    A more reasonable approach is to use these as clues to discuss four universally significant technical issues:

    First, how agents translate fuzzy requirements into executable engineering plans.
    Second, how long-running execution maintains goal consistency and recovers from errors.
    Third, why complex reasoning capabilities do not necessarily bring stability in simple tasks.
    Fourth, how to measure real costs, including retries, caching, and human review.

    For development teams, the key is not how long a model can work continuously, but whether it can stably produce verified deliverables within explicit boundaries.

    II. Capability Highlight 1: From Generating Code to Managing Tasks

    Traditional code completion solves local problems, like completing functions, explaining exceptions, or generating queries. Agent programming handles longer dependency chains: understanding requirements, inspecting the project, formulating plans, modifying implementations, executing validations, and adjusting based on feedback.

    The core of this change is shifting from “generating an answer” to “maintaining a task state.”

    Take an accounting system as an example. “Support recording income/expenses and calculating cash flow” seems clear but actually lacks many necessary constraints:

    How many decimal places are allowed for amounts? Can categories be deleted? How should categories referenced by historical transactions be displayed after modification? Are statistics calculated by transaction time or entry time? Is there multi-user data isolation?

    If these questions are not recognized, even if the model quickly generates a UI, it may only complete superficial features.

    A reliable execution method should first establish a mapping between requirements and acceptance criteria. For example:

    Functional Goal Must-Clarify Constraints Checkable Acceptance Results
    Add Transaction Amount precision, transaction time, income/expense type Consistent query after writing, illegal input rejected
    Edit Category Duplicate name rules, historical association strategy Associated records remain intact after modification
    Delete Data Permission boundaries, recovery strategy Unauthorized operation fails, statistics sync update
    Transaction Statistics Time range, time zone, refund logic Detail summation matches statistical results

    The value of this table lies in transforming the vague “it’s done” into checkable completion conditions.

    Meanwhile, the number of database tables should not be a capability metric. A simple app may only need a few core entities; data structures need expansion only after adding budgets, accounts, audits, etc. Whether the design is appropriate should be determined by business constraints, not how many modules the model generated.

    III. Capability Highlight 2: Long-Horizon Execution Value Comes from Closed-Loop Validation

    Being able to run continuously for about an hour shows the execution chain has some continuity, but duration itself does not equal engineering quality. An agent might be continuously advancing tasks, or it might be repeatedly modifying the same error.

    Therefore, long-horizon capability needs to be judged on at least three levels.

    1. Is the Goal Maintained Consistently?

    During execution, newly emerging errors easily shift task focus. For example, to fix a page display issue, an agent might opportunistically refactor a large amount of unrelated code, ultimately increasing risk without improving delivery quality.

    The initial goal, current stage, and completion conditions should be saved in an explicit task list. Each round of modification must answer: Which requirement does this change correspond to, and did it introduce extra scope?

    2. Are Errors Truly Decreasing?

    Valuable self-correction is not repeated attempts, but using new evidence to narrow down the problem. After running tests, failed cases, exception locations, and related modifications should be retained to determine the root cause, rather than just doing large-scale replacements based on error keywords.

    If the failure type and key error message remain unchanged after multiple consecutive modifications, automatic execution should pause to re-examine assumptions.

    3. Is Validation Independent from Implementation?

    If a model writes code and generates tests itself, the same incorrect assumption might enter both. For instance, if the implementation mistakenly rounds amounts to integers, and the tests only use integer amounts, all tests will still pass.

    Therefore, key businesses need independent acceptance cases. For an accounting system, check the following invariants:

    • Under the same filter conditions, statistical values should match the sum of transaction details.
    • After deleting an income record, the corresponding income summary should decrease by the same amount.
    • Modifying a record’s category should not change its amount and associated account.
    • Different users cannot read or modify each other’s data.

    These checks are closer to real engineering quality than “the page opens.”

    IV. Capability Highlight 3: Tool Feedback Makes Reasoning a Verifiable Process

    Complex tasks often cannot be completed by the model’s internal reasoning alone. File reads, code execution, test results, and log information provide external evidence for the next decision.

    However, more tool calls do not mean better results. Effective tool usage should follow a “propose hypothesis - gather evidence - update judgment” process.

    For example, if a statistics API returns an exception, you can first check input parameters, then verify query conditions, and finally cross-check raw records in the database. Directly and repeatedly modifying the entire statistics module often increases localization costs.

    It is also necessary to distinguish validation methods for different task types:

    Engineering tasks usually get feedback through builds, tests, and run results; mathematical proofs must check whether each derivation step holds; situational Q&A needs to cross-check real-world goals and action premises. They cannot share the same “looks reasonable” judgment criteria.

    Performance in logic puzzles also cannot be directly extrapolated to strict proof tasks. The former may allow gradually narrowing the answer range by supplementing information, while the latter requires all key steps to have sufficient basis. Assessments should be tracked separately, rather than merged into a vague “reasoning ability” score.

    V. A Cautionary Tale: More Thinking Is Not Necessarily More Reliable

    Simple task failures often expose system problems more easily than complex task failures.

    For instance, a user asks: “The car needs washing, the wash station is very close, should I walk or drive?” If the analysis only revolves around distance and walking time, but ignores the premise that the car must be brought to the site, the answer will be formally fluent but practically invalid.

    Such issues indicate that a longer reasoning chain does not necessarily improve accuracy. The model might introduce conditions not provided in the prompt, or waver back and forth between multiple interpretations, ultimately deviating from the user’s goal.

    However, attributing all such errors to “overthinking” is also imprecise. Understanding biases, prompt ambiguities, random generation, and context interference can all produce similar phenomena, requiring repeated testing to differentiate.

    Engineering can adopt a layered processing strategy:

    For clear, low-risk, and directly judgeable tasks, prioritize concise answers; for critical ambiguities, clarify first; for complex constraints or high-risk decisions, add validation and review.

    Task routing should be based on error cost and verifiability, not simply on the word count of the prompt. Short questions might carry high risk, while long questions might just be mechanical information sorting.

    VI. Placing Autonomous Execution in a Bounded Environment

    Once long-horizon agents have file access, command execution, and network request capabilities, the impact of errors extends from text to real systems. Therefore, execution boundaries must be established before the task begins.

    First is least privilege. Development tasks should not have default write access to production databases, nor should they touch irrelevant credentials. Reading project files, modifying working directories, and executing tests can have separately set permission scopes.

    Second is isolated execution. Automated execution should preferably be completed in an independent working copy or isolated environment, with restricted accessible directories, network targets, and resource consumption. Operations like deleting files, modifying permissions, or executing irreversible data changes require additional confirmation.

    Finally, explicit stop conditions. An illustrative control flow can be expressed as:

    1. Initialize task goals, acceptance checklist, and resource budget
    2. While execution limit not reached:
    3. Check for high-risk operations
    4. If present, pause and request confirmation
    5. Execute current minimal necessary step
    6. Collect test results and change logs
    7. If acceptance passed, end
    8. If repeated failure or lacking new evidence, pause
    9. Output completed items, pending issues, and verification evidence

    The execution limit here includes not only time but should also cover cumulative tokens, tool call counts, and modification scope. Even if a single call is cheap, meaningless loops can still cause significant resource waste.

    VII. Accounting for 10-Million-Token Consumption

    Token consumption can reflect workload but cannot directly represent output value. The same consumption might come from effective development, or from lengthy context, repeatedly reading files, or repeated failures.

    A more practical cost model is:

    Total Cost = Model Invocation Fee + Tool Operation Fee + Environment Fee + Human Review Cost + Failure Rework Cost.

    Caching might reduce some repeat input fees, but actual benefits depend on the service’s billing rules, hit conditions, and context reuse. You cannot assume significant discounts just because a long task contains repetitive content.

    Caching also cannot replace context management. Continuously putting large amounts of irrelevant logs into context, even if partially reusable, can still increase processing burden and interfere with the model’s focus.

    It is recommended to record the following metrics per task:

    • First-time acceptance pass rate;
    • Final acceptance pass rate;
    • Total cost per successful task;
    • Number of human interventions and review duration;
    • Number of retries and failure reasons;
    • Number of defects found after delivery.

    Among them, “total cost per successful task” usually has more business explanatory power than unit token price. A cheap but repeatedly failing execution path may not be more economical than a higher-priced but stably delivering path.

    VIII. Building a Reusable Evaluation System

    To turn scattered experiences into actionable team conclusions, standardized testing methods must be established.

    First, prepare a consistent initial environment for tasks, including requirement specs, project state, permission scope, and available resources. Second, set identical time and consumption limits, and record whether human assistance was provided midway. Finally, validate basic functionality, data consistency, security, and maintainability separately.

    The test set should cover both normal and failure paths. For example, in addition to adding a correct transaction, check illegal amounts, cross-user access, duplicate submissions, empty data statistics, and summary consistency after data modification.

    For tasks with randomness, conduct multiple independent runs and specify the sample size. One success can demonstrate possibility but cannot represent stability; one failure is also insufficient to prove a certain capability is completely unusable.

    All conclusions should be accompanied by their scope of applicability. Clearly stating “what results were obtained under what tasks, environments, and budgets” is more valuable than broadly claiming “it can already replace developers.”

    IX. Conclusion: The True Goal is Controllable Delivery

    The progress of agent programming is not just faster code generation, but the emerging ability to maintain task plans, utilize tool feedback, and advance multi-step work.

    However, long running times, complex reasoning, and high token consumption are merely process features. The final engineering judgment still depends on whether requirements are met, results can be reproduced, risks are controllable, and total costs are reasonable.

    For developers and enterprise teams, a more robust path is to start with low-risk, verifiable tasks, gradually building mechanisms for task decomposition, independent validation, permission isolation, exception stopping, and cost tracking. Only by connecting these links can autonomous execution transition from an exciting demo into a stable, trustworthy engineering capability.