LLM Coding Performance: Separating Model Capability from Agent Framework Effects

    The same large language model can deliver very different coding results across agent frameworks. This article explains how to separate model capability from framework and environment effects using controlled experiments, fixed task sets, execution logs, and acceptance criteria. It also covers UI regression testing, common framework failures, and how to interpret evaluation results without overgeneralizing.

    1. Why the Same Model Can Produce Different Coding Results

    When using large language models for programming tasks, developers often find that the same model performs very differently across agent frameworks. In one environment, it completes changes across multiple files. In another, it repeatedly fails to call tools correctly, misses requirements, or produces misaligned interfaces.

    These differences make it difficult to determine whether the limitation lies in the model itself or in the runtime surrounding it.

    There are three reasons to analyze this systematically:

    • Evaluation results influence model selection. Incorrect attribution can lead a team to reject a usable model or continue using one that is poorly suited to its tasks.
    • Framework designs vary substantially. System prompts, tool descriptions, context compression, retry mechanisms, and permission boundaries all change what the model actually receives. These differences are often overlooked, even though they directly affect results.
    • Without a consistent evaluation method, discussions become subjective. Claims that a model has “become less capable” or that a framework is “broken” are difficult to assess without reproducible evidence.

    2. Break Down the Factors Affecting Performance

    The outcome of a coding task typically depends on several layers:

    1. Base model capability: Code comprehension, task planning, and reasoning over long contexts.
    2. System prompts: The wording and length of role definitions, output conventions, and behavioral rules.
    3. Tool interfaces: Whether parameter definitions for file operations, command execution, and code search are clear, and whether returned results use consistent formats.
    4. Context management: How conversation history is trimmed or summarized, and whether critical requirements survive long tasks.
    5. Execution control: Whether multi-step loops are allowed, how failures are retried, and when execution stops.
    6. Environment constraints: Sandbox policies, permissions, dependency versions, and runtime limits.

    The first layer belongs to the model itself. The others belong to the framework or execution environment. Developers observe the combined result, so a useful evaluation must distinguish between these sources of influence.

    3. Use Controlled Experiments to Attribute Differences

    The core principle is to change one factor at a time while keeping the others fixed.

    Step 1: Build a fixed task set

    Include tasks at different difficulty levels, such as single-file generation, multi-file changes, bug fixes, and reproducing a target UI. Define acceptance criteria for every task before running the evaluation, rather than judging results subjectively afterward.

    Step 2: Fix the model version and inference settings

    Record the model identifier, sampling temperature, maximum output length, and other relevant settings so the experiment can be reproduced.

    Step 3: Run the same tasks across multiple frameworks

    For each run, retain the complete inputs, outputs, tool-call logs, and timing data.

    Include a direct API baseline: call the model directly with a minimal prompt. This provides a reference with fewer framework influences and helps assess what the model can accomplish without additional orchestration. Treat it as a baseline, not a measure of the model’s maximum capability.

    Step 4: Score and compare the results

    If the same model scores substantially lower in Framework A than in Framework B, the framework side is a likely source of the difference. If scores are similar across frameworks but consistently below expectations, examine whether the tasks are appropriate or whether they reach the model’s capability limits.

    The following pseudocode illustrates the process:

    1. tasks = load_task_set("benchmark_v1")
    2. frameworks = ["Framework A", "Framework B", "Direct API baseline"]
    3. model = "fixed-version-model-under-test"
    4. results = []
    5. for fw in frameworks:
    6. for task in tasks:
    7. run = execute(fw, model, task.prompt, timeout=600)
    8. score = check_acceptance(run.output, task.criteria)
    9. results.append({
    10. "framework": fw,
    11. "task": task.id,
    12. "score": score,
    13. "tool_errors": run.count_tool_errors(),
    14. "steps": run.step_count,
    15. "duration_s": run.duration,
    16. })
    17. report = aggregate(results, group_by=["framework"])

    4. Define Acceptance Criteria for Visual Tasks

    Generating a page with a specified visual style is a common evaluation task. Acceptance should go beyond whether the page “looks right.” Check four layers:

    • Structure: Does the page load correctly? Are there console errors? Are all sections visible?
    • Interaction: Do menus expand and collapse correctly? Does navigation work? Does the responsive layout behave as expected?
    • Visual presentation: Do fonts, colors, and spacing match the requirements? Are decorative effects rendered correctly?
    • Stability: Does state remain consistent after repeated interactions? Do elements overlap, shift out of position, or display text incorrectly?

    Consider a navigation panel that initially covers the main content. A follow-up request makes the panel collapsible, but text then renders incorrectly in its collapsed state. This suggests that the model may have overlooked relationships between existing UI states during the revision.

    Evaluation should therefore cover more than the initial output. After every modification, rerun the interaction checks to catch regressions.

    5. Common Agent Framework Problems

    If controlled comparisons point to the framework, prioritize the following checks.

    1. Tool descriptions do not match the model’s expected conventions. Unfamiliar parameter names or return formats can lead to repeated tool-call failures.
    2. System prompts are too long or contain conflicting rules. When instructions conflict, the model may favor later instructions or ignore some constraints.
    3. Context is truncated. If original requirements are removed or weakened during summarization, later steps may drift away from the initial objective.
    4. Errors are handled poorly. Returning only a raw tool error, without actionable guidance, can cause the model to repeat unsuccessful attempts.
    5. Stopping conditions are missing. Without step or budget limits, the model may keep modifying files while consuming resources without producing a usable result.

    Disable or replace individual features and observe the effect. For example, remove the custom system prompt, then restore it in a separate comparison. Alternatively, fix the context length and compare results under that condition.

    Change only one factor at a time to identify which feature is actually influencing the outcome.

    6. Interpret Evaluation Results Carefully

    Avoid three common mistakes when drawing conclusions.

    A single run is not reliable

    LLM outputs are stochastic. Repeat each task multiple times and examine the distribution of results rather than relying on one output.

    Task difficulty can amplify differences

    Simple tasks may succeed in most environments. Differences often become visible in multi-step tasks, long-context work, or changes requiring coordination across files. The evaluation set should include a sufficient proportion of difficult tasks.

    Attribution is not the same as assigning blame

    Models and frameworks can be coupled. A framework’s prompt format, for example, may fit one type of model better than another.

    Describe conclusions as performance under a specific configuration, rather than making broad judgments about whether a model is good or bad.

    7. Practical Recommendations

    1. Maintain a fixed evaluation task set and rerun it whenever the model or framework is upgraded.
    2. Record model versions, framework versions, and key settings in selection documents so conclusions remain traceable.
    3. Keep a direct API baseline to help identify where problems originate.
    4. Classify failures into tool, prompt, context, and model categories, then turn those findings into a concrete improvement list.
    5. Retain human acceptance testing for critical business tasks, using automated metrics as supporting evidence.