Why AI Coding Assistants Seem to Get Worse Over Time: Causes and Fixes

    This article explains why AI coding assistants often feel less capable after a week of use, even when the underlying model has not changed. It shows how context bloat, caching and batching, routing policies, and evaluation bias dilute effective model capability in real engineering workflows. You will learn how to build a minimal reproducible evaluation baseline, manage context budgets, tune sampling parameters, apply progressive validation, and standardize team processes to keep coding assistant performance stable.

    1. Background: Why It Works Well at First and Degrades a Week Later

    In real development work, the perceived decline of AI coding assistants is not an illusion. It is usually the result of multiple factors stacking up. The core idea from the original discussion can be summarized in one sentence: the model’s capability has not changed, but its effective capability is diluted by the engineering pipeline. Effective capability refers to the portion of the model’s ability that can actually be used to generate correct code under the current session context, routing policy, and cache state.

    There are four common causes:

    • Context bloat: Long sessions accumulate irrelevant files, failed attempts, and repeated logs, which dilutes attention.
    • Caching and batching: To reduce latency and cost, the server side applies prefix caching, batching, and quantization. Different hit paths lead to fluctuations in output stability.
    • Routing policy changes: Under high load, requests may be scheduled to lighter models or more conservative sampling parameters, and complex refactoring tasks are hit first.
    • Evaluation bias: Early impressions come from a small number of “sweet spot tasks.” After long-term use, you encounter long-tail, complex engineering problems, so the perceived experience naturally drops.

    2. Build an Observable Baseline: Measure First, Then Judge

    Do not draw conclusions based on feeling alone. It is recommended to first build a minimal reproducible evaluation set on a real repository, covering four task types: code completion, cross-file refactoring, test generation, and log troubleshooting. Use 20 to 30 cases per type, with fixed random seeds and temperature parameters.

    A sample evaluation skeleton:

    1. cases = load_cases("repo_evalset.jsonl") # Each case contains prompt, context files, and expected key points
    2. def run(case, temperature=0.2, seed=42):
    3. ctx = build_context(case.files, budget=8000) # Control the context budget
    4. return call_model(ctx + case.prompt, temperature=temperature, seed=seed)
    5. report = []
    6. for c in cases:
    7. outs = [run(c) for _ in range(3)] # Repeat three times to observe variance
    8. report.append(score(c, outs)) # Compile pass rate, unit test pass rate, key point hit rate
    9. print(summarize(report))

    It is recommended to fix four key metrics: first-pass compile rate, unit test pass rate, manual key point hit rate, and variance across three repeated runs. Rising variance often exposes “capability degradation” earlier than a drop in the mean.

    3. Context Engineering: Spend the Budget Where It Matters

    Context is the scarcest resource. Effective practices include:

    1. Layered retrieval: First use a symbol index to locate relevant functions and interfaces, then inject only the necessary implementation snippets instead of loading entire files.
    2. Externalize failure experience: Write the reason for the last failure into a separate “constraint list” instead of leaving failed attempts in the session history to interfere repeatedly.
    3. Task splitting: Split “refactor + add tests + update docs” into three sessions, keeping only one goal per session.
    4. Structured output constraints: Require a list of change points first, then the patch. This can significantly reduce the chance of going off topic.

    A simplified context assembly example:

    1. def build_context(files, budget=8000):
    2. picked, used = [], 0
    3. for f in rank_by_symbol_relevance(files): # Rank by symbols and call relationships
    4. cost = estimate_tokens(f)
    5. if used + cost > budget:
    6. break
    7. picked.append(f); used += cost
    8. return render(picked) + "\nConstraints: only modify necessary lines, keep public interfaces unchanged"

    4. Parameters and Sampling: The Hidden Switch for Stability

    Complex engineering tasks are very sensitive to sampling randomness. In engineering practice, the temperature is usually kept in a low range, and the seed is fixed for reproducibility. For design discussions that require exploring multiple options, randomness can be increased separately. In addition, setting the maximum output length too conservatively can truncate long patches, which appears as “capability degradation” but is actually truncation. It is recommended to first use a small sample to confirm whether the output is complete, then evaluate quality.

    5. Progressive Validation: Small Commits, Easy Rollback

    Treat generated results as patches to be validated, not as final answers. The recommended flow is: generate a list of change points → generate the patch → compile locally → run relevant unit tests → run static checks → manually review critical paths. Keep a rollback-capable commit point at each step, and use logging services and monitoring alerts to locate anomalies, avoiding a burst of problems during integration.

    6. Enterprise Adoption: Confine Uncertainty Within Processes

    Key practices for teams and enterprises:

    • Standardize the evaluation set and baseline, and run regression weekly to prevent individual perceptions from driving technology choices.
    • Define data boundaries clearly. Route sensitive code to private or dedicated deployment, and use object storage and key management for permission isolation.
    • Use a container platform to standardize the development environment, ensuring generated code compiles in a consistent environment and reducing cases where “environment differences masquerade as model differences.”
    • Build a library of prompt and context templates to accumulate high-quality constraints and reduce dependence on individual skills.

    7. Conclusion

    In most cases, “capability degradation” is not a single model problem, but an engineering problem caused by the combined effect of context, sampling, routing, and evaluation criteria. First build an evaluation baseline, then apply the three key practices of context budgeting, parameter fixing, and progressive validation. Most perceived fluctuations can be located and converged. In related engineering practice, Baidu AI Cloud also emphasizes observable metrics and standardized processes to ensure stable delivery of AI coding capabilities.