Why AI Coding Still Looks Unreliable Yet Keeps Growing: Heterogeneous Model Collaboration

    This article explains why AI coding tools remain unreliable in some situations while adoption keeps rising, and why the pattern of "Model A writes, Model B reviews" often outperforms a single model checking its own output. It covers the limits of self-review (context anchoring, unchanged knowledge blind spots, missing external evidence), the difference between reopening a session with the same model and collaborating across heterogeneous models, a generate-critique workflow with pseudocode, and practical engineering practices such as risk-based collaboration intensity, spec-first development, small changes, deterministic tooling first, context isolation with structured output, evaluation and observability, and security/compliance. The takeaway: reliability comes from process design and verifiable collaboration, not from trusting a model blindly.

    1. The Apparent Contradiction: Imperfect Tools, Growing Adoption

    “Have a large model write a piece of code and it often has logic holes; yet more and more developers around me are using AI to code.” This is a genuine confusion for many developers. On the surface the two observations conflict: if the tool is not reliable enough, why invest time and effort in it? Put AI coding back into the real workflow of software engineering, however, and the contradiction disappears.

    The essence of software development is not writing perfect code in one pass. It is a continuous process of iteration, verification, and correction. Even if a coding assistant is unstable on any single generation, it has clear engineering value as long as it meaningfully lowers the startup cost of going from a blank page, quickly produces a draft that can be discussed, and helps with repetitive rewrites and test generation. What developers actually rely on is not “the model automatically delivers correct results,” but “the model accelerates exploration, while tests and review converge on quality.”

    So the question of whether AI coding is reliable cannot be answered with a binary judgment. A more accurate statement is: AI remains unreliable in low-supervision, long-chain, high-complexity tasks; in settings with human review, test verification, and clear boundaries, it can noticeably improve efficiency. The practice widely adopted in the industry is usually not to let the model complete an entire system on its own, but to place it inside a “generate-verify-correct” loop.

    It is precisely within this loop that “A writes, B revises” becomes a technical pattern worth studying. It is not simply asking the model one more time. Through role separation, context isolation, and model heterogeneity, it reduces the probability that the same error is repeatedly amplified.

    2. The Limits of a Single Model Selling to Itself

    Having one model write code and then check itself is the first instinct of many people. The results are sometimes acceptable, especially for obvious spelling mistakes, syntax problems, and local omissions. But on complex logic, interface semantics, and boundary conditions, it is often not reliable enough. There are three main reasons.

    2.1 Context Inertia Pulls the Model Toward Defending Its Original Answer

    After generating code in a continuous session, a model’s later judgments are easily influenced by the preceding text. It has already “settled on” an implementation path, so when reviewing it is more likely to add explanations around the original plan than to overturn the premise. Even if the prompt demands a “strict review,” the original line of thinking, variable naming, assumptions, and explanations remain in context and create an anchoring effect.

    This is similar to a student checking their own homework right after finishing it: their understanding of the problem, their calculation path, and their mistaken assumptions are all still in their head, so the check usually just walks the same path again. Truly effective review often comes from someone who did not participate in the original reasoning.

    2.2 A Single Model’s Knowledge Blind Spots Do Not Disappear by Changing Roles

    If the model is unfamiliar with the boundary behavior of a certain interface, unclear about the state transitions of a class of concurrency models, or holds a systematic misunderstanding of some error-handling pattern, then having it “play the reviewer” within the same knowledge range cannot conjure up missing knowledge. It may make the wrong explanation more self-consistent, and even supply plausible-sounding justifications for a flawed design.

    Switching to a new session can weaken context inertia and make the model re-examine the code, which is valuable. But if the underlying knowledge distribution is unchanged, systematic “unknown unknowns” remain. Put differently, the same model in a new session is more like “taking another breath and looking again” than “judging with a different body of knowledge.”

    2.3 Self-Review Lacks Independent Evidence

    Relying only on a conversation between models is still making judgments inside language space. The strongest evidence for code quality comes from outside: whether it compiles, whether types are consistent, whether tests cover it, whether static analysis raises warnings, whether runtime resource constraints are met. Without such evidence, a reviewer is easily persuaded by the surface structure of the code.

    Therefore “let the model check once more” cannot replace engineering verification. It can serve as a supplementary means of finding problems, but it should not be the only guarantee of correctness.

    3. Same Model, New Session Is Not Heterogeneous Model Collaboration

    Many discussions conflate “switching to a different model” with “starting a new session with the same model.” Both can change the output, but the mechanisms differ.

    Same model, new session mainly breaks context inertia. The new session carries none of the old assumptions, so the model may reorganize its answer from a different angle. It suits second-pass phrasing, spotting obvious omissions, and adding test ideas. But its knowledge boundary is essentially unchanged: an interface it did not know before can still be wrong in a new session, and business rules it tends to confuse do not automatically become clear.

    Heterogeneous model collaboration is not only a change of context but a change of knowledge distribution and error patterns. Different models may differ in training data composition, parameter scale, alignment objectives, decoding strategy, prompt templates, and engineering constraints. A class of problems that Model A often misjudges is not necessarily where Model B fails. Only when their “weak zones” do not fully overlap can they complement each other.

    The two can be summarized as: same model, new session is “a different perspective”; heterogeneous collaboration is “a different set of cognitive biases.” The former is cheap and suited to routine re-checks; the latter costs more but is more valuable for high-risk code, complex logic, and critical interfaces. The key is not “how many models were used,” but “whether the models participating in the judgment provide genuinely different information.”

    It should be stressed that heterogeneous collaboration is not a mathematically precise hedge. Different models may share similar training corpora and may make correlated errors on similar tasks. It can reduce some correlated bias, but it cannot guarantee correctness. Engineering practice still has to rely on tests, static checks, and human review as the backstop.

    4. Why “A Writes, B Revises” Usually Beats “A Selling to Itself”

    Technically this pattern can be abstracted as a “generate-critique” architecture: one role turns requirements into an implementation, the other finds defects based on the spec, the diff, and verification results. Its advantages appear in three areas.

    4.1 Asymmetric Task Difficulty: Generation Is Easier to Lose Control Of

    When generating code, the model must simultaneously handle requirement understanding, interface selection, data structures, exception paths, naming style, and maintainability. A misunderstanding at any point can be amplified along the call chain. Verification is different: the reviewer can make local judgments around an explicit spec, test results, and the code diff — whether a parameter can be null, whether state transitions are closed, whether an error is swallowed, whether resources are released, whether logs leak sensitive information.

    This does not mean review is always easy. Reviewing complex systems is equally hard, but verification can usually be decomposed into smaller, more checkable questions. Separating “from nothing to something” from “finding errors in something that exists” lets the model work under different objectives and reduces the bias of being both the athlete and the referee.

    4.2 Heterogeneous Models Cover Different Blind Spots

    Suppose Model A tends to miss cancellation and timeout handling in a certain class of asynchronous logic, while Model B is relatively sensitive at the same spot; and Model B is weaker at judging a certain class of resource release, while Model A is good at it. Having A generate and B review can then catch problems A would miss when checking alone. The reverse assignment is also possible: choose “who writes, who reviews” dynamically based on task type.

    This complementarity is not mysticism; it comes from differences in error distributions caused by different training paths. In real systems it should be validated with historical defect data: which models under-report on which tasks, and which combinations have more reasonable false-positive and acceptance rates. Do not assume collaboration is automatically better just because “the models are different.”

    4.3 Role Separation Makes an Auditable Process Easier to Build

    In engineering practice, splitting generation, review, test generation, and final adjudication into distinct stages makes it easier to record the input, output, and basis of each step. For example, the reviewer must see the requirement description, the code diff, the compile result, and the test report, rather than only a passage of the generator’s self-explanation. When disputes arise, you can return to the evidence chain instead of arguing back and forth among several models’ natural-language explanations.

    A simplified collaboration flow can be written as pseudocode:

    1. function develop(task):
    2. spec = planner(task) // organize requirements, constraints, and acceptance criteria
    3. patch = generator(spec) // produce a small-granularity change
    4. history = []
    5. for round in range(MAX_ROUNDS):
    6. build = compile_and_test(patch)
    7. static = static_analysis(patch)
    8. review = critic(spec, patch, build, static) // isolated context, preferably a heterogeneous model
    9. if review.blocking_issues is empty:
    10. break
    11. history.append(review)
    12. patch = generator.fix(spec, review, build) // correct based on evidence
    13. if still_has_blocking_issues:
    14. escalate_to_human(spec, patch, history)
    15. return patch

    The point of this flow is not “more models is better,” but that every step has a clear input and a verifiable output. The reviewer should receive the spec, the code diff, the build result, and the test results — not the generator’s lengthy self-reasoning, which can pull the reviewer into the same set of assumptions.

    5. The Root Cause of “Self-Review Is Like a Pupil Checking Their Own Homework”

    The analogy fits because self-review often lacks independence, adversarial pressure, and external evidence all at once.

    First, the model tends to preserve internal consistency. Having already produced one explanation, it is inclined to patch details during review rather than negate the premise. Second, a role prompt is not real independence. Even when told “you are now a strict reviewer,” the model may still carry forward implicit assumptions from the earlier text. Third, there is no verification anchor. Without tests, compilation, and spec constraints, the model can only judge by language patterns and easily mistakes “looks reasonable” for “logically correct.” Fourth, the correlation of errors is not broken. A domain the same model is unfamiliar with often remains unfamiliar under a different role.

    The fix is not designing harsher prompts but changing the structure of the process:

    • Give the reviewer an isolated context with only the necessary evidence;
    • Use different models or different model families for high-risk modules;
    • Make compilation, type checking, unit tests, integration tests, and static analysis hard gates;
    • Require the review output to be a structured list of issues, not a vague overall assessment;
    • Bring in human review or comparison against an external spec for disputed items;
    • Limit the number of automatic correction rounds so the model does not repeatedly “polish” the same error in a loop.

    The popularity of AI coding does not mean developers believe it can fully replace people. On the contrary, a great deal of effective practice rests on “humans lead, machines accelerate, tools verify.”

    First, coding tasks are naturally feedback-rich. Compile errors, test failures, static analysis warnings, and runtime logs all provide fast feedback. As long as the process is designed well, errors in model-generated code can be found quickly. Compared with other generation tasks that lack objective verification standards, code is easier to close the loop on.

    Second, AI is good at handling the many steps with high cognitive startup cost and high repetition: generating boilerplate structure, explaining legacy code, adding boundary tests, converting interfaces, organizing error messages, and producing refactoring drafts. Even when these need human modification, they save the thinking time of starting from a blank page.

    Third, developers use an “assist mode,” not an “unattended mode.” Humans still decompose requirements, confirm architecture, review diffs, and bear final responsibility. What AI provides is not an unquestionable conclusion but a modifiable first draft. Handing an imperfect but iterable draft to an experienced developer and letting the model independently deliver a production system are two entirely different risk levels.

    Finally, teams usually measure value by delivery cycle time, modification cost, speed of problem discovery, and reduction of repetitive work — not by “the model generated something completely correct on the first try.” As long as the verification means in the existing process are strong enough, the efficiency gains from AI can exceed the cost of fixing its errors.

    7. Engineering Practices That Make Heterogeneous Collaboration Actually Work

    7.1 Choose Collaboration Intensity by Risk Level

    Not every task justifies multiple models. Low-risk tasks such as simple renaming, local refactoring, and adding comments can use a single model plus automated checks. High-risk modules involving permissions, money, state machines, data migration, concurrency, and high-availability paths are better served by heterogeneous review, test generation, and human verification. Collaboration intensity should scale with the cost of an error, not stack models unconditionally.

    7.2 Spec First, Generation Second

    Handing the model a vague requirement and then expecting the reviewer to find every problem is unrealistic. A more effective approach is to first write down interface contracts, inputs and outputs, boundary conditions, failure strategies, and acceptance criteria. The model generates within those constraints, and the reviewer checks item by item against them. The clearer the spec, the more easily generate-and-critique collaboration converges.

    7.3 Small Changes, Shorter Feedback Loops

    Having the model generate a large amount of code at once significantly increases review difficulty and the range over which errors propagate. Breaking the task into small changes that can be verified independently, each handling a single business goal and paired with compilation, targeted tests, and diff review, makes problems easier to localize. Small commits also lower rollback cost.

    7.4 Let Deterministic Tools Go First

    Before model review, run compilation, type checking, format checking, static analysis, and automated tests. Anything a deterministic tool can decide should not consume model attention first. Models are better suited to semantic ambiguity, boundary omissions, design consistency, and maintainability — problems that require integrated judgment.

    7.5 Context Isolation and Structured Output

    The reviewer receives only the necessary material: the requirement spec, the code diff, test results, the static analysis report, and known risk points. Output should use a structured format, for example “blocking issues, major issues, minor suggestions, missing tests, items needing human confirmation.” This reduces verbal redundancy and makes later automated aggregation and tracking easier.

    7.6 Build Evaluation and Observability

    Teams should record the first-pass rate of AI-generated code, review acceptance rate, defect escape rate, number of rollbacks, average correction rounds, and delivery cycle time. Build a small evaluation set from your own codebase and periodically compare the real performance of different model combinations. Whether heterogeneous collaboration is worth it should ultimately be decided by data, not by demo results.

    7.7 Security and Compliance Cannot Be Deferred

    AI coding touches source code, configuration, logs, and business context. Be explicit about which data may enter a model, which must be redacted, and which can only be processed in a controlled environment. Run dependency security scans, license checks, secret scans, and permission-boundary review on generated code. Model output must be brought into version control and the audit chain so it stays traceable and rollback-able.

    8. Conclusion: The Key Is Verifiable Collaboration, Not More Models

    AI coding “looking unreliable” and “being widely used” are not in conflict. Treat the model as a fully automatic programmer and it will indeed expose hallucinations and logic holes on complex tasks; treat it as a coding assistant for high-frequency iteration, and wrap it in a verification loop of tests, static checks, human review, and process constraints, and it creates real value in a large number of scenarios.

    In this process, the value of heterogeneous model collaboration lies not in simply increasing the number of models, but in using knowledge differences from different training paths to break a single model’s context inertia and systematic blind spots. A writes and B revises often works because it separates generation from verification, introduces different error distributions into the process, and constrains judgment with external evidence.

    The sounder engineering conclusion is: use lightweight re-checks for low-risk tasks, heterogeneous review for high-risk tasks, automated verification as the baseline for all tasks, and keep final decision authority with humans. The reliability of AI coding does not come from blind trust in a model; it comes from process design. The real competitive edge is not making several models “chat” with each other, but building a verifiable, traceable, convergent collaboration loop.