Evaluating Local Coding Agents in Practice: A Login and Registration Development Case Study

    Local coding agents are often judged by how fast they generate code, but that says little about whether they can ship real features. This article uses login and registration development — a task that spans input validation, authentication, credential storage, session management, concurrency, and security — as a testbed for evaluating coding agents. It covers how to define a delivery contract before coding starts, build automated acceptance criteria for functional, security, and engineering quality, measure end-to-end efficiency beyond raw output speed, account for quantization, context management, and caching effects, assess test quality rather than test quantity, run repeatable experiments, and integrate agents into engineering governance instead of bypassing it. The goal is a reusable evaluation framework, not a model ranking.

    1. Why Login and Registration Is a Good Lens for Evaluating Coding Ability

    Login and registration may look like a few forms and endpoints, but in reality they span input validation, authentication, credential storage, session management, concurrency handling, and security auditing. A page that renders correctly and a user who can log in once do not mean the system is ready for production.

    This kind of feature is well suited to testing a coding agent’s engineering capability: the task boundary is easy to define, the happy path can be verified automatically, and the failure paths are rich enough to reveal whether the model understands real business constraints.

    The original material for this article focused on a local coding agent’s performance in bug fixing and application building. The key to abstracting that experience into a general method is not comparing model names, but answering three questions:

    First, did the agent actually complete the task, rather than merely producing code that looks plausible?

    Second, how did it complete the task — did it consume excessive time, context, or tool calls?

    Third, is the final result maintainable, secure, and reproducible?

    This article uses login and registration as the example scenario. The scenario is not treated as something already validated by the original tests, and no single-run results are used to rank products.

    2. Define the Delivery Contract Before the Agent Starts Coding

    If the task description is just “implement login and registration,” different agents will likely deliver completely different systems. Some may build only the UI, some will add server-side endpoints, and some will throw in email verification or a complex permission system. At that point, time spent and code size cannot be compared directly.

    The right approach is to fix a delivery contract up front, covering at least:

    • Which field serves as the registration identifier, whether it can be changed, and how duplicates are detected;
    • What password rules apply, whether whitespace is allowed, and how length boundaries are handled;
    • What session mechanism is used after successful login, and when sessions expire;
    • Whether logout requires immediate server-side session revocation;
    • Whether successful registration logs the user in automatically;
    • Which pages and endpoints must be authenticated;
    • Which features are explicitly out of scope.

    These constraints should be written into the task description and kept consistent with the acceptance tests. For example, if logout must invalidate the session immediately, you should not just clear browser-side state — you should verify that the old session can no longer access protected resources.

    When evaluating, also distinguish two types of tasks.

    One is bug fixing in an existing system, which mainly tests the agent’s ability to localize problems, the scope of its changes, and regression risk. The other is building features from scratch, which mainly tests requirements decomposition, architectural organization, and complete delivery. The two can share acceptance principles, but should not be merged into a single opaque total score.

    3. Build an Automated Acceptance System Based on Executable Results

    Evaluations of coding ability should rely on repeatable, executable checks — not on how fluent or well-explained the agent’s responses are.

    3.1 Functional Acceptance

    Basic acceptance for a login/registration module should cover both happy and failure paths, including:

    • Valid input completes registration;
    • Duplicate identifiers do not create multiple accounts;
    • Correct credentials allow login;
    • Incorrect credentials do not establish a valid session;
    • Unauthenticated requests cannot access protected resources;
    • After logout, the old session no longer satisfies the defined access conditions;
    • Invalid input receives responses consistent with the API contract.

    Testing only the success path overestimates completeness. Many defects only surface with empty input, duplicate submissions, session expiry, or concurrent registrations.

    3.2 Security Acceptance

    Passwords must not be persisted in plaintext, and fast general-purpose hashes must not be used as a substitute for a dedicated password hashing scheme. Use an algorithm designed for password storage, with the computational cost configured appropriately for the deployment environment.

    Login failure messages should also account for account enumeration risk. If the system returns distinct “account not found” and “wrong password” errors, an attacker can use the difference to determine whether an account is registered. Where appropriate, use a unified failure message while keeping an auditable internal error classification.

    If session credentials are attached automatically by the browser, you also need to assess cross-site request forgery (CSRF) risk. Session identifiers, passwords, and other sensitive data should not appear in ordinary logs. Login attempts should have reasonable rate limiting, but a naive lockout policy should not be treated as complete protection, since a poorly designed lockout can itself be abused to disrupt legitimate users.

    These checks only validate defined risk conditions — they do not replace a full security audit.

    3.3 Engineering Quality Acceptance

    Code quality cannot be measured by file count, lines of code, or number of tests alone. More useful checks include:

    • Whether the agent follows existing directory and dependency management conventions;
    • Whether authentication logic is reasonably separated from page rendering;
    • Whether unnecessary dependencies were added;
    • Whether existing interface compatibility is preserved;
    • Whether executable setup and run instructions are provided;
    • Whether existing tests still pass after the changes.

    For fix tasks, you should also record which files and logic the changes touched. A smaller footprint is not automatically better, but more unrelated refactoring generally means higher review cost and regression risk.

    4. End-to-End Efficiency Is Not the Same as Output Speed

    When running locally, a common mistake is to only watch how many tokens per second the model generates. This metric describes part of the inference performance, but it does not directly represent how fast the development task gets done.

    Total task time can be approximated as:

    Total time ≈ input processing time + model generation time + tool execution time + scheduling wait time

    Tool execution may include reading code, searching files, installing dependencies, compiling, running tests, and waiting for services to start. If the agent runs the full test suite repeatedly, or reads the same files over and over, tool time can become the dominant bottleneck.

    Therefore, an evaluation should record at least:

    • End-to-end completion time;
    • Number of input and output tokens;
    • Number of tool calls and interaction rounds;
    • Number of test executions and their duration;
    • Number of retries after failures;
    • Number of human interventions;
    • Final acceptance results.

    An agent with terse output may be faster, but you need to confirm it did not skip necessary verification. An agent that plans thoroughly may need fewer interactions, but if the plan is built on wrong assumptions, it may also expand the scope of changes in one shot.

    What is actually worth pursuing is reducing wasted work — not mechanically cutting back on explanations or tool calls.

    5. Understand How Quantization, Context, and Caching Interact

    5.1 Quantization Is a Deployment Variable, Not a Quality Verdict

    Quantization reduces storage and compute overhead by lowering the precision of some numerical representations, but the actual benefit depends on the model architecture, runtime support, operator implementation, and hardware.

    Different quantization schemes may affect memory requirements, throughput, long-context processing efficiency, and output stability. Even if two schemes use similar bit widths, you cannot conclude they perform the same.

    If the systems being evaluated use different quantization methods, the results actually reflect the combination of “model + quantization scheme + runtime + hardware.” You cannot attribute all differences to the model itself, nor can you simply conclude that “lower precision is always faster” or “higher precision is always better for coding.”

    5.2 Context Management Affects Decision Quality

    An agent needs to understand requirements, directory structure, relevant implementations, and failure logs — but more context is not always better. Repeatedly loading irrelevant files increases processing overhead and can dilute key constraints.

    A reasonable working order is: first read the task requirements and project overview, then locate the relevant modules, then add information based on test results. For long tasks, keep an explicit progress summary to avoid re-exploring the entire project every round.

    Evaluations must record the context limit, history retention policy, and truncation method — otherwise there may be hidden differences between runs.

    5.3 Cache Hit Rate Does Not Directly Represent Total Cost

    Prompt prefix caching can reuse previously processed stable input and reduce redundant computation. Long-lived tool descriptions, task rules, and parts of the conversation history may become reusable content.

    But a high hit rate only means that specific input processing was reused — it does not mean output generation, test execution, or overall energy consumption dropped proportionally. You also need to clarify the measurement basis: are hits counted per request, per input token, or per actually reusable cache block?

    A stable prefix usually helps cache reuse, but you should not skip necessary code updates or error feedback just to raise the hit rate. Correctness should always take priority over cache metrics.

    6. Test Count Is Not Test Quality, and Coverage Is Not Proof of Correctness

    Generating more tests usually helps make requirements explicit, but the number of tests alone says nothing about how thorough the verification is.

    For example, multiple tests that only verify successful registration with different usernames may still completely miss concurrent duplicate registrations, session revocation, and privilege bypass. High coverage also does not prove the assertions are sound: code being executed does not mean the tests checked the critical behavior.

    A more reliable test strategy has three layers:

    The first layer verifies local rules, such as input validation and state transitions.

    The second layer verifies component cooperation, such as consistency between credential checks, data writes, and session creation.

    The third layer verifies complete user flows, such as register, log in, visit a protected page, log out, and visit again.

    You should also maintain independent acceptance tests and prevent the agent from freely modifying the scoring logic. Otherwise, it may unintentionally change the expected outcomes, making “tests pass” meaningless.

    7. Build Trustworthy Conclusions Through Repeated Experiments

    A single run can reveal differences in working style, but it is not enough to form a stable conclusion. Model output is somewhat stochastic, and cache state, system load, dependency installation, and tool response times all affect results.

    A recommended process:

    1. Fix the project’s initial state; every run starts from the same baseline.
    2. Fix the requirements, tool permissions, runtime configuration, and resource budget.
    3. Record cold-cache and warm-cache experiments separately.
    4. Run the same task repeatedly and record success rate, median time, and variance.
    5. Test bug fixing, feature building, and tasks of varying complexity side by side.
    6. Classify failures into logic errors, environment issues, tool misuse, and budget exhaustion.

    For tasks that cannot be completed within budget, mark them clearly as failed or timed out — do not just compare the runtimes of successful runs. Otherwise, a setup with a low success rate but occasional fast runs may gain a misleading advantage.

    The final report should retain run logs, code changes, acceptance results, and environment details so the conclusions can be reviewed.

    8. Integrate Agents into the Engineering Pipeline — Don’t Bypass Engineering Governance

    Login and registration involve identity and access boundaries, so “auto-generated code that passes tests” should never be treated as equivalent to “ready for automatic production release.”

    In practice, you can let the agent work in an isolated workspace — reading code, proposing changes, running tests, and generating change notes — while restricting its access to production credentials, real user data, and high-privilege operations. Changes to authentication flows, permission rules, or dependencies should require human review.

    Teams can set different goals depending on the task: the prototyping stage prioritizes quickly forming a verifiable flow; day-to-day fixes prioritize success rate, change scope, and regression behavior; security-sensitive modules should have stricter requirements for failure-path testing, auditing, and human review.

    Ultimately, a reliable evaluation is not about finding an abstract “fastest agent.” It is about building a system that can state task boundaries, verify deliverables, explain resource consumption, and reveal failure modes. Only by placing model behavior inside real engineering constraints can you determine whether it actually reduces development cost — and whether that benefit justifies the associated risk.