Give Your Coding Agent a Check It Cannot Fake

Kane CLI Runs Plain-English Checks in a Real Browser and Returns Pass or Fail With an Evidence Pack Your Coding Agent and Your CI Can Read.

npm install -g @testmuai/kane-cli

AICodingAI Testing

What Is Agentic Coding? The Loop, the Data and How to Verify It

Agentic coding hands a goal to an AI agent that plans, edits, runs and checks code. How the loop works, what usage data shows, and how to verify agent output.

Published on:

In Anthropic's study of about 400,000 Claude Code sessions, novice-rated sessions reached verified success 15% of the time, and sessions rated intermediate or higher reached it 28-33% of the time (Agentic coding and persistent returns to expertise, June 2026). At least partial success was far more common, 77% for novices and 91-92% for everyone else, so in most sessions the agent finished some of the work without leaving the hard evidence that the study counts as verified.

TestMu AI makes Kane CLI, a testing agent that coding agents call, so this guide has a stake in the verification argument. Outside data comes first, and TestMu AI's own research is labelled as vendor research where it appears.

Overview

Agentic coding is software development in which an AI agent carries out the multi-step work of a change: it reads the codebase, plans, edits files, runs commands and tests, and repeats until it decides the task is done. The developer sets the goal, reviews the result and decides whether the claimed result is true.

What Are the Core Ideas?

  • The agentic coding loop: An AI coding agent moves through goal, explore, plan, act and check, then iterates or stops. The stop decision is the weak step, because the agent that wrote the change usually decides when the work is finished.
  • Agentic coding vs vibe coding: In agentic coding, a developer reads the diffs and test evidence before merge; in vibe coding, that review is light or skipped. Agentic coding targets production code; vibe coding suits prototypes.
  • Verified success: Anthropic's Claude Code study counts a session as a verified success only when it is judged successful and leaves a hard signal, such as matching commits or pull requests, or passing test suites.
  • Independent end-to-end check: Kane CLI by TestMu AI lets a coding agent run a plain-English check in a real browser and get back pass or fail, an exit code from 0 to 3, and an evidence pack a developer can review.

What Is Agentic Coding?

Agentic coding is software development in which an AI agent, not the developer, carries out the multi-step work of a change. The developer describes the outcome, and the agent decides which files to read, what to edit, which commands to run and when to stop.

Google Cloud's explainer (last updated 29 September 2026) defines it as "a software development approach where autonomous AI agents plan, write, test, and modify code with minimal human intervention." The Claude Code overview describes the developer's side: "Describe what you want in plain language. Claude Code plans the approach, writes the code across multiple files, and verifies it works."

What changes from earlier AI help is what the agent is allowed to do:

  • Tools - the agent reads and writes files, runs shell commands, uses git, calls test runners, and connects to other systems through MCP servers.
  • A loop - it acts, reads the result and acts again; in Anthropic's study, each user prompt set off a chain of around 10 actions on average.
  • The stop decision - the agent decides when it is finished, and Anthropic's best practices list "Claude said it was done and it wasn't quite" among the usual reasons a session goes wrong.

How Does Agentic Coding Work?

Agentic coding works as a loop that repeats until a stop condition is met. Claude Code, Codex, Gemini CLI and Cursor's agent all follow this basic shape:

  • Goal - the developer states the task, for example "Add a SAVE10 promo code to checkout."
  • Explore - the agent reads the relevant files, configuration and history.
  • Plan - it decides which files change, in what order, and how the change will be tested.
  • Act - it edits code and runs commands.
  • Check - it runs whatever signal it has: a build, a linter, unit tests or a screenshot.
  • Iterate or stop - if the check fails, it goes back to step 4; if the check passes, or the work looks done, it stops and reports.

Anthropic's Claude Code best practices put the weight on step 5: "Give Claude something it can run that comes back pass or fail. Once it has that, it can keep going on its own and you don't have to watch."

The same page names the weak point in step 6: "Claude stops when the work looks done. If it has nothing to run that tells it whether the work actually is done, 'looks done' is all it has to go on. In practice that makes you the test suite, and every mistake sits there until you happen to notice it."

How Is Agentic Coding Different From Vibe Coding and AI-Assisted Coding?

Agentic coding, vibe coding and AI-assisted coding differ in who acts and who checks:

QuestionAI-assisted codingVibe codingAgentic coding
Who writes the codeThe developer, with suggestionsThe AIThe AI agent
Who runs commands and testsThe developerOften nobodyThe AI agent
Who reads the codeThe developerOften nobodyThe developer reviews diffs
Typical unit of workA line or a functionA prototypeA ticket or a pull request
Main riskThe developer stays the bottleneckUnreviewed code in productionCode that passes the agent's own checks but fails users

Martin Fowler draws the same line in his bliki entry on agentic engineering (21 May 2026): "With vibe coding humans don't look at the code, indeed they forget that it even exists", while with agentic engineering "they are concerned with the code, often giving it detailed review."

So agentic coding is a production workflow with review gates, and vibe coding is a prototyping style. For the prototyping side, see what is vibe coding.

What Does Real Usage Data Say About Agentic Coding?

The Anthropic study cited above, published on 16 June 2026, covers about 400,000 interactive Claude Code sessions from about 235,000 people between October 2025 and April 2026, and its findings shape how a team should adopt agentic coding:

  • Humans plan, agents execute - people made about 70% of the planning decisions but only 20% of the execution decisions.
  • Expertise changes outcomes - in a typical novice-rated session each prompt set off about 5 agent actions, against about 12 in expert-rated sessions, and verified success rose from 15% for novices to 28-33% for sessions rated intermediate or higher.
  • Partial success is common - at least partial success was 77% for novices and 91-92% for everyone else, and the gap between partial and verified is the work a reviewer still has to do.
  • The work is shifting - the share of sessions spent fixing broken code fell from 33% to 19%, while operating software rose from 14% to 21%.

The study defines a verified success as a session that is judged successful and where "there is at least one hard verifiable signal of success." Its classifier looks for git activity that matches the work (commits and pull requests), passing test suites, and explicit confirmation from the user.

Why Do Agentic Coding Sessions Stop Before the Work Is Done?

Sessions stop early because the decision to stop, step 6 of the loop, is usually made by the same agent that wrote the change. These patterns lead to premature stops:

  • Self-written tests - the agent writes a unit test for its own change, and the test encodes the agent's understanding, so it passes even when that understanding is wrong.
  • No check above the unit level - a build and unit tests can pass while the rendered page, the checkout total or the mobile flow is broken, and an agent loop has no browser or device check until you add one.
  • Agent-reported passes - when an agent drives a browser itself and reports "verified", the report is the agent's account, not an independent reading of the page.

A Self-Written Test That Passes a Wrong Total

The first pattern is easy to reproduce with Node.js 25.5.0's built-in test runner and a small cart function. The acceptance criterion says SAVE10 takes 10% off a $20.00 cart and then charges 8% tax on the discounted subtotal, so the customer pays $19.44. The implementation taxes the pre-discount subtotal instead:

// cart.js - the agent's change
// Spec: SAVE10 takes 10% off the subtotal, then
// 8% tax is charged on the discounted subtotal.
export function totalDue(cents, promo) {
  const discount = promo === 'SAVE10' ? cents * 0.1 : 0;
  const tax = cents * 0.08; // taxes the pre-discount subtotal
  return Math.round(cents - discount + tax);
}

A test written from that implementation asserts whatever the code returns, 1960 cents. A test written from the acceptance criterion asserts 1944:

// test/agent.test.js - written by the agent from its code
test('SAVE10 on a $20.00 cart', () => {
  assert.equal(totalDue(2000, 'SAVE10'), 1960);
});

// test/spec.test.js - written from the acceptance criterion
// $20.00 - 10% = $18.00, + 8% tax = $19.44
test('SAVE10 total matches the spec', () => {
  assert.equal(totalDue(2000, 'SAVE10'), 1944);
});

With only the agent's test in the suite, the run reports 1 pass and exits 0. With the spec test added and the suite wrapped the way a Claude Code Stop hook runs it, the real output (lines trimmed) is:

$ npm test --silent 1>&2 || exit 2
✔ SAVE10 on a $20.00 cart (1.6438ms)
✖ SAVE10 total matches the spec (3.6893ms)
ℹ tests 2
ℹ pass 1
ℹ fail 1
...
  1960 !== 1944
...
# exit status: 2

Exit code 2 is the value that tells Claude Code to send the agent back to work. The failure came from a check the agent did not write, and the same holds above the unit level: a browser check written from the same criterion would fail the checkout page for the same 16 cents.

How Often Agent-Reported Browser Passes Are Wrong

TestMu AI measured the third pattern in its Verification Bench (published 2 November 2026). Claude Code and Codex each drove Playwright MCP through 25 multi-stage workflows on four live TestMu AI apps, nightly through October 2026, alongside Kane CLI, and a separate grader compared each claimed result with the page where it could.

  • Claude Code with Playwright MCP - a false pass rate of 16.8%, meaning reported passes that the page contradicted.
  • Codex with Playwright MCP - a false pass rate of 13%.
  • Kane CLI - a false pass rate of 0.8%.

Treat these figures as vendor research. TestMu AI built Kane CLI and designed, ran and graded the benchmark on its own live products, and the 25 workflows are not public. The grader counts only the contradictions it found, so the true rate may be higher for every setup, and it could neither confirm nor contradict 53.1% of Kane CLI's checks.

Note

Note: Kane CLI gives a coding agent a browser check it does not grade for itself: plain-English acceptance criteria in, pass or fail and an evidence pack out. New accounts get 10,000 Kane CLI credits valid for 30 days. See Kane CLI for AI coding agents.

How Much Autonomy Should You Give the Agent?

Give the agent as much autonomy as you can check independently, and no more. The verification ladder below is one way to decide where a team sits; each rung adds a check that does not depend on the agent's own judgement.

RungWhat checks the workSafe level of autonomy
0. TrustNothing; the agent says it is doneThrowaway prototypes only
1. Self-checkTests and builds the agent chose or wroteSmall, low-risk edits you read line by line
2. Deterministic gateA hook or CI job you wrote runs on every change and blocks on failureMulti-file changes with human diff review
3. Independent end-to-end checkA separate testing agent checks the user-facing outcome against criteria you wrote and leaves screenshots, logs and a verdictFeature work merged after reviewing evidence, not rerunning it
4. Release gate for shipped agentsThe AI agents inside your product are tested against functional and adversarial scenarios before releaseShipping agentic features to customers

Anthropic's Claude Code best practices cover rungs 1 and 2. A /goal condition is checked by a separate model after every turn, a Stop hook is enforced by Claude Code itself and sends the agent back to work when its script exits with code 2, and the same page lists "getting a reviewer that hasn't seen how the code was written" as a reason to use a subagent. Rungs 3 and 4 need a separate tool.

The ladder pairs with the L0 to L5 autonomy ladder that Sumit Shatwara of Cognition presented in the agentic engineering session from Testμ 2026: that ladder measures how much work a team delegates, and this one measures how much of that work it can check.

How Do You Set Up an Agentic Coding Workflow That Verifies Itself?

You set one up by giving the agent project rules, a plan step and a check it cannot fake. The steps below use Claude Code. Codex, Gemini CLI, Cursor and GitHub Copilot offer their own versions of some of these pieces, and where they have hooks, the hooks differ in what they can block.

  • Write the project rules - add a short CLAUDE.md (Claude Code) or AGENTS.md (Codex, Cursor, Copilot and others) with build commands, test commands and conventions. Anthropic's guidance is that "every line in it takes a little of Claude's attention on every task", so the file should hold only what the agent cannot work out from the code.
  • Plan before code - start Claude Code with claude --permission-mode plan for any change that touches more than one file. Claude Code's permission modes docs say plan mode researches and proposes changes without editing your source; ask for a plan that ends with how the change will be verified end to end.
  • Add a deterministic gate - run your build, linter and unit tests on every change with a hook or CI job. In Claude Code, a Stop hook in .claude/settings.json blocks the turn from ending until the check passes.
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          { "type": "command", "command": "npm test --silent 1>&2 || exit 2" }
        ]
      }
    ]
  }
}

Whatever the command prints to stderr goes back to the agent as the reason it cannot finish. Per Anthropic's docs, if the hook blocks eight stops in a row with no tool call between them, Claude Code overrides the next block and ends the turn.

Step 4. Give the agent an independent end-to-end check. Install Kane CLI, TestMu AI's terminal testing agent, and the skill that teaches your coding agent to call it:

npm install -g @testmuai/kane-cli
npx @testmuai/kane-cli-skill   # Claude Code, Codex CLI, Gemini CLI
kane-cli login --oauth

For Cursor and GitHub Copilot, the Kane CLI with AI coding agents docs give a one-line command that appends Kane CLI's instructions to your repo's AGENTS.md, and Kiro installs it as a Power. The coding agent can then check a feature in a real browser against acceptance criteria written in plain English:

kane-cli run 'go to http://localhost:3000/cart, apply the code SAVE10, assert the total due shows $19.44' \
  --agent --headless --timeout 120
  • --agent - streams NDJSON, one event per line, and the final run_end event carries the status, a summary, the duration, extracted values and session_dir, which points to the evidence pack.
  • Exit codes - 0 for pass, 1 for fail, 2 for an authentication, setup or parse error, and 3 for a timeout or cancellation.
  • Evidence pack - per-step screenshots, a HAR network log, console output and failure records, so the agent reads the result and you read the evidence.
  • Test Manager - every session uploads to TestMu AI Test Manager by default, and run_end carries the link.

Step 5. Save the check and replay it in CI. Naming a run saves it as a _test.md file in .testmuai/tests/, and a successful run writes what it needs for replay into an output-<stem> folder next to the test file. Commit both with your code:

# Save the check as a test the first time it runs
kane-cli run '<objective>' --url http://localhost:3000/cart \
  --agent --headless --name checkout-flow

# Replay it on every pull request
kane-cli testmd run .testmuai/tests/checkout-flow_test.md \
  --agent --headless

Per the docs for running saved Kane CLI tests, later runs replay each step's saved recording "with no agent involved and no LLM cost". When a replay fails, adaptive healing retries smaller replay windows and then re-authors the steps, and element matches below its confidence bar are rejected instead of clicked.

Step 6. Review evidence, not just diffs. For each agent pull request, look at the diff, the deterministic gate result and the end-to-end evidence, and treat a change with no evidence as unverified. A failed Kane CLI run looks like this in the evidence view:

Kane CLI evidence view of a failed login check: the final assertion expected a Welcome Back message while the page showed Logged In Successfully, with the step list beside the page screenshot

That run, from a TestMu AI walkthrough on a public practice login page, set the expected message to "Welcome Back!" on purpose while the page showed "Logged In Successfully". Every login step passed, the final assertion failed, and the run ended with exit code 1 instead of healing into a pass.

Kane CLI - Testing Agent in Your Terminal

What Are the Risks of Agentic Coding?

The main risks of agentic coding are unverified output, excessive permissions and review overload, and each has a concrete control. The OWASP Top 10 for LLM applications lists two of them by name for 2025: Prompt Injection (LLM01) and Excessive Agency (LLM06).

RiskWhat it looks likeControl
Unverified outputTests pass, but the feature is broken for usersIndependent end-to-end checks with evidence (rung 3)
Excessive agencyThe agent runs destructive commands or touches secretsLeast-privilege permission modes, allowlists and sandboxing
Prompt injectionThe agent follows instructions hidden in files, issues or web pagesTreat tool output and fetched content as untrusted, and restrict which MCP servers are allowed
Review overloadPeople approve large agent pull requests without reading themSmaller tasks, plan review before code, and evidence attached to each pull request
Context lossThe agent forgets constraints in long sessionsShort instruction files, a fresh session per task, and subagents for research

Where Does Agentic Coding Run: Terminal, IDE or Cloud?

Agentic coding runs in the terminal, in the IDE and in cloud sandboxes, and many agents cover more than one surface. Anthropic's overview lists Claude Code in the terminal, IDE extensions, a desktop app and the browser, and Cognition's Devin Bots page says every Devin session runs in its own virtual machine.

  • Terminal - Claude Code, Codex CLI and Gemini CLI run as command-line agents next to your build and test tools.
  • IDE - Cursor's agent and GitHub Copilot work inside the editor, where diffs are reviewed as they land.
  • Cloud - Devin and GitHub Copilot cloud agent take a task, work in a hosted environment and hand back a pull request.

This guide does not rank them. For a side-by-side comparison of 12 agents, see AI coding agents, and for terminal-first tools, see the comparison of agentic coding CLI tools. Whether the agent should also write the tests is its own question, covered in can coding agents test their own code.

Where Is Agentic Coding Going Next?

Agentic coding is moving from one agent per developer to agents that manage other agents. Fortune reported on 17 November 2026 that Cognition's Devin Bots coordinate teams of Devin agents on projects that can run for days or weeks, with a Bot joining a team's Slack as its own member. The same report names OpenAI's Dots, which integrates with Codex, and Anthropic's Duet, which can integrate with Claude Code.

  • Verification has to scale with output - if agents open more pull requests than people can read, the checks that gate a merge must run without a person and leave evidence a person can audit later. Devin Bots vs Kane CLI walks through that merge gate.
  • The software you ship will contain agents - when your product's own agents call tools, write files and hit APIs, a unit test of the code around them is not enough.

That second case is what Agent Assurance is for. Its command-line tool, Rook CLI, derives functional and adversarial scenarios from your code or spec, runs your agent, checks each criterion against what the run changed rather than what the agent reported, and reports separately what it could not verify. The 14-day free trial includes 4,000 credits, and the Agent Assurance plans list what comes after it. Install Rook CLI from npm (Node.js 20 or newer):

npm install -g @testmuai/rook@latest
Start a 14-day free trial of Agent Assurance by TestMu AI, with 4,000 credits, to test how your AI agents behave across workflows, tools, and actions

Next Steps

Pick the next agent pull request that touches a user flow, write its acceptance criterion in one plain-English sentence, and make that sentence the check the agent must pass before it reports done. Kane CLI runs that check from Claude Code, Codex, Gemini CLI, Cursor or GitHub Copilot, and the same test replays in CI on every later pull request.

To run your first test, create a TestMu AI account, or
for a full walkthrough of the product.

Author

...

Anubhav Singhmaar

Blogs: 51

  • Linkedin

Anubhav Singhmaar is an AI Product Manager at TestMu AI driving Kane CLI, the command-line tool that brings browser automation to the terminal, turning natural-language flows into runs in a real Chrome browser that return pass or fail with shareable proof. He owns the roadmap and prioritization and works with engineering to ship developer-facing features. Before TestMu AI, he spent over four years at Sprinklr owning enterprise voice AI across APAC and EMEA. A mechanical engineer turned product manager, he grounds guidance in real QA workflows.

Reviewer

...

Srinivasan Sekar

Reviewer

  • Linkedin

Srinivasan Sekar is Director of Engineering at TestMu AI, where he leads engineering and open-source initiatives behind the Selenium and Appium automation grid and owns TestMu AI's MCP Server. A committer to Appium and a contributor to Selenium, WebdriverIO, Taiko, and AppiumTestDistribution, he brings over 15 years of experience in quality engineering and open-source technologies. He is the author of the Apress book 'The MCP Standard: A Developer's Guide to Building Universal AI Tools with the Model Context Protocol,' a Certified Kubernetes and Cloud Native Associate, and an international conference speaker. Before TestMu AI he spent over eight years at Thoughtworks as a Principal Consultant and Quality Architect. Srinivasan holds a B.Tech in Information Technology from Anna University.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Agentic Coding FAQs

Did you find this page helpful?

More Related Blogs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests