> Markdown version of [Dev Loop](https://vaadin.com/docs/next/agentic-development/dev-loop-tutorial). Section index: [llms.txt](https://vaadin.com/docs/next/agentic-development/llms.txt)

# Give Agents Faster Turnaround with Dev Loop (since V25.3)

> **Note: Preview Feature**
>
> The Dev Loop CLI is a preview feature. This means that it is not yet ready for production usage and may have limitations or bugs. We encourage you to try it out and provide feedback to help us improve it.

An AI coding agent is quick at writing a change and slow at finding out whether it worked. Left alone, it rebuilds the project, restarts the application, and waits for it to come up. Then it takes a screenshot and reasons about a picture to decide whether its change landed. Every round trip costs wall-clock time. It also costs tokens: the agent re-reads startup output and rebuilds state that the application had a moment earlier.

Dev Loop cuts that round trip down to one command. The agent edits, runs `apply`, and has an answer within seconds. The exit code says whether the change is live. The line under it names what happened: a hot swap, a push into the open page, a restart, or a failure. The application keeps running between changes, so the agent doesn’t pay to warm it up again.

In this tutorial, you set up Dev Loop on a generated Vaadin starter and hand the application to Claude Code or Codex. The agent makes three changes of increasing size:

- a stylesheet tweak

- a change to a view

- a feature that spans several files

None of them needs a restart by hand, or a screenshot to confirm. At the end, you measure the turnaround against the same work done with ordinary restarts, on your own project.

Nothing here is agent-only. Every command below is one you can run yourself, and you get the same answers. What the agent gets is a loop it can close on its own.

## <a id="what-you-need"></a>What You Need

- **Java 21 or newer**

- **A JetBrains Runtime, strongly recommended.** Without one, more of your edits restart the application instead of hot-swapping, and the agent’s turnaround suffers. Download a JBRSDK build from the [JetBrains Runtime releases](https://github.com/JetBrains/JetBrainsRuntime/releases) page, at your project’s Java version or newer, and extract it into `~/.jdks/`.

- **Maven**, as `mvn` on the path or as the wrapper in the project

- **Network access the first time you install**

- **[Claude Code](https://www.claude.com/product/claude-code) or [Codex CLI](https://developers.openai.com/codex/cli)**, installed and signed in

See [Prerequisites](https://vaadin.com/docs/next/flow/configuration/live-reload/dev-loop-cli.md#prerequisites) for the details of each.

## <a id="step-1"></a>1. Get the Base Application

Open [Vaadin Start](https://start.vaadin.com) and keep the sample view. Dev Loop needs a recent enough platform version (since V25.3), so expand **Configure Project Settings** and check which version the project uses. Download the project, extract it, and open it in your IDE.

You get a small Spring Boot and Maven application — a task list, with a grid of tasks, a toolbar for creating them, and a stylesheet:

```
src/main/java/com/example/
  Application.java
  base/ui/MainLayout.java              the shell: header, side nav, footer
  examplefeature/
    Task.java                          the JPA entity
    TaskRepository.java
    TaskService.java
    ui/TaskListView.java               the view at /
src/main/resources/
  META-INF/resources/styles.css        the application's own CSS
  application.properties
```

Each of the three changes in [Step 5](#step-5) targets a different one of those, because each produces a different result from Dev Loop.

Check two things in `pom.xml` before going further. First, that the version you picked came through:

```xml
<properties>
    <vaadin.version>25.4.0-beta4</vaadin.version>
</properties>
```

Second, confirm that the `vaadin-dev` dependency is present. It’s what the CLI resolves the daemon from, and a generated starter already declares it:

```xml
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-dev</artifactId>
    <optional>true</optional>
</dependency>
```

The `<optional>true</optional>` keeps it out of your production build.

## <a id="2-install-the-cli-and-the-skills"></a>2. Install the CLI and the Skills

One goal installs both:

```bash
mvn vaadin:install-dev-cli
```

Run it in the directory that holds your application’s `pom.xml`. It writes the CLI into `.vaadin/`, and the skills into `.agents/skills/` and `.claude/skills/`.

There’s no separate step for installing the skills, and nothing to configure per agent. Claude Code discovers skills in `.claude/skills/`, and Codex discovers them in `.agents/skills/`, so the single goal above covers both — and any other agent that follows either convention.

**Commit all of it**, the way you commit `mvnw`, so that every developer and every agent working on the repository gets the same instructions. See [Installing the CLI](https://vaadin.com/docs/next/flow/configuration/live-reload/dev-loop-cli.md#install) for what else the goal does, and for installing without network access.

## <a id="3-give-the-agent-vaadins-documentation"></a>3. Give the Agent Vaadin’s Documentation

This step is optional, but it’s worth the two minutes. Vaadin adds API faster than a model’s training data is refreshed, so an agent working from memory writes plausible code against methods that don’t exist. The Vaadin MCP server answers from the real documentation for the version in your `pom.xml`.

**Claude Code**

```terminal
/plugin marketplace add vaadin/agent-marketplace
/plugin install vaadin-skills@vaadin-marketplace
```

**Codex**

```terminal
codex plugin marketplace add vaadin/agent-marketplace --ref main
codex plugin add vaadin-skills@vaadin-marketplace
```

One plugin installs the MCP server and a set of Vaadin development skills together. For manual configuration, or for any other tool, see [Claude Code](https://vaadin.com/docs/next/agentic-development/mcp/supported-tools/claude-code.md), [Codex](https://vaadin.com/docs/next/agentic-development/mcp/supported-tools/codex.md), or the [MCP Server](https://vaadin.com/docs/next/agentic-development/mcp.md) overview.

While you’re here, add a browser automation tool. A Playwright MCP server is the usual choice. The Dev Loop skills expect one for verifying changes that have a visual surface, but they don’t install it. Without one, the agent falls back to your project’s own browser tests, and says that’s what it did.

## <a id="4-start-the-loop"></a>4. Start the Loop

Ask what’s running, and then start it:

```bash
.vaadin/vaadin-dev status
.vaadin/vaadin-dev start
```

The `status` command costs milliseconds, as it starts no JVM. The `start` command takes roughly 30 seconds cold, and blocks until the application is serving or has failed.

On Windows, use `.vaadin\vaadin-dev.cmd` instead. See [The Cycle](https://vaadin.com/docs/next/flow/configuration/live-reload/dev-loop-cli.md#cycle) for the launchers.

Now **open <http://localhost:8080> and leave the page open**. This matters more than it looks: a stylesheet push has somewhere to land only if a page is already connected. Run `apply` with no page open, and it reports the file copied to the classpath and says nothing about a push — honest, but not the answer you came for. Open the page before the first change, not after.

From now on, the daemon owns the application’s process. Don’t also start the application with `spring-boot:run` or an IDE run configuration, since a second launcher fights the daemon for port 8080.

## <a id="step-5"></a>5. Let the Agent Work

Start your agent in the project directory, and give it the prompts below one at a time. Each produces a different outcome, and each comes back verified without a restart by hand. The time on the `compiling` line is the agent’s turnaround for the change.

You don’t need to mention Dev Loop in the prompt. The installed skill tells the agent to use it, and to treat an edit that hasn’t been applied as unfinished.

### <a id="a-stylesheet-change"></a>A Stylesheet Change

Example prompt:

- "Give the task list more breathing room: more vertical padding in the grid rows, and make the Create button full width on narrow screens."

The agent edits `src/main/resources/META-INF/resources/styles.css`, and applies. Expect this:

```
change-set: 1 file(s): src/main/resources/META-INF/resources/styles.css
compiling → runtime → Stable   (0.4s)
hmr: 1 resource(s) copied, pushed 1 stylesheet(s) in place
```

Watch the browser: the spacing changes without the page reloading. Your session, your scroll position, and anything you’d typed into the form are all still there.

### <a id="a-change-to-a-view"></a>A Change to a View

Example prompt:

- "Rename the Create button to Add Task, and show a notification with the task’s due date when a grid row is clicked."

This one edits `TaskListView`, a view class, so the new bytecode is swapped into the running JVM:

```
change-set: 1 file(s): src/main/java/com/example/examplefeature/ui/TaskListView.java
compiling → runtime → Stable   (1.2s)
hot-reload: redefineClasses(1); onHotswap completed=true
```

Again, no restart and no reload.

You may instead see `→ live, but no Vaadin component was redefined` under the `hot-reload:` line. That isn’t a failure: the new bytecode is live, but Flow had nothing to refresh, typically because the affected output was rendered on the server and pushed once already. Interact with the view, or reload the page. Don’t apply again — there’s nothing left to compile.

### <a id="a-feature-across-several-files"></a>A Feature Across Several Files

Example prompt:

- "Add a priority to tasks: Low, Normal, or High. Store it with the task, show it as a sortable grid column, and let the user pick one when creating a task."

Now the agent touches `Task`, `TaskService`, and `TaskListView`. It should make all of those edits and then apply **once**: `apply` finds the change-set itself by scanning the sources, so running it per file wastes a cycle each time.

A changed JPA mapping never hot-reloads, because Hibernate fixes its metamodel and schema at startup, so Dev Loop escalates:

```
change-set: 3 file(s): .../Task.java, .../TaskService.java, .../ui/TaskListView.java
compiling → runtime → restarting → Stable   (9.8s)
```

Reload the page to see it. The escalation is the point: rather than report a hot swap that didn’t take, Dev Loop does the thing that works and names it. Everything the agent needs to know is in that one line.

> **Note:** `Stable` isn’t always green. If an `app log:` line appears under it, the change went live and the application then threw:
>
> ```
> compiling → runtime → Stable   (1.1s)
> hot-reload: redefineClasses(1); onHotswap completed=true
> app log: 1 error(s) since the change; see target/devloop/app.log
> ```
>
> Read the error before treating the change as working. A well-behaved agent does the same.

> **Tip:** If you watch the agent’s tool calls, you shouldn’t see `mvn compile`, `mvn test`, or `mvn spring-boot:run` between edits. A Maven cycle pays for a fresh JVM and a fresh Spring context to answer a narrower question than `apply` answers against the application that’s already running. Running the test suite once at the end, over the change as a whole, is a different matter, and still worth doing.

## <a id="6-measure-the-turnaround"></a>6. Measure the Turnaround

The faster turnaround should show up in the whole session, as less wall-clock time and as fewer tokens spent after each restart. You can check that on your own project rather than taking anyone’s word for it.

Use the same prompt, the same model, and two clean copies of the project:

1. **Baseline.** Start the application with `mvn spring-boot:run`, and let the agent restart it however it likes. Run the prompt in a fresh session.

2. **Dev Loop.** Start the application with `.vaadin/vaadin-dev start`, and run the same prompt in another fresh session.

Read the session total at the end of each:

| Tool        | Command                    | What It Reports                                                                               |
| ----------- | -------------------------- | --------------------------------------------------------------------------------------------- |
| Claude Code | `/status`                  | Session cost, API and wall-clock duration, and tokens per model.                              |
| Claude Code | `/usage`                   | Usage against your plan limits.                                                               |
| Codex       | `/status`                  | Model and token usage for the current window. No cost figure.                                 |
| Codex       | `/usage`                   | Token activity over time. Requires Codex CLI 0.140.0 or later.                                |
| Either      | `npx ccusage@latest daily` | Costs in dollars, read from the local session logs. Codex is supported as a beta data source. |

Three numbers are worth comparing: wall-clock time, total cost, and **cache-read tokens**. The last one explains the other two. Every restart throws away a warm application and makes the agent re-establish context it had already paid for — recreating test data in an in-memory database, re-reading files, and reasoning about startup output. The longer the session, the more of that Dev Loop avoids.

A few things to be fair about when you read your own numbers:

- **One run per scenario is noise.** Model sampling varies more than the effect you’re measuring on a single small change. Run a realistic multi-step session, not a one-liner.

- **A compile error can be slower under `apply`**, which recompiles only the change-set. An edit that splits across files can surface at runtime rather than at compile time, and cost a turn to diagnose.

- **Some changes restart either way.** Structural changes to Spring beans, JPA mappings, and non-theme frontend files restart under Dev Loop too, as the third prompt above demonstrated. The saving comes from everything else.

- **Annotation processors don’t run** in Dev Loop, so a project using Lombok or MapStruct needs `mvn compile`. See [Limitations](https://vaadin.com/docs/next/flow/configuration/live-reload/dev-loop-cli.md#limitations) before drawing conclusions from a project that uses one.

## <a id="what-you-built"></a>What You Built

- An agent that verifies each change in seconds: it edits, applies, reads a verdict, and knows the difference between a hot swap, a restart, and a failure.

- An application that stays warm between changes, running under a daemon that owns its process instead of under Maven or an IDE.

- A CLI and a set of agent skills committed to the project, so that every agent and every developer on it works the same way.

- A measurement of the turnaround you can repeat on your own project, rather than a claim.

## <a id="troubleshooting"></a>Troubleshooting

- `its network source differs from the one declared for it in settings`

  Claude Code already has a marketplace named `vaadin-marketplace` with a different source, such as the deprecated `vaadin/claude-plugin`. Remove it, add the marketplace again, and reinstall the plugin, which the removal disabled:

  ```terminal
  /plugin marketplace remove vaadin-marketplace
  /plugin marketplace add vaadin/agent-marketplace
  /plugin install vaadin-skills@vaadin-marketplace
  ```

For problems with Dev Loop itself, see [Troubleshooting](https://vaadin.com/docs/next/flow/configuration/live-reload/dev-loop-cli.md#troubleshooting) in the reference, or the `reference.md` installed next to the skill, which documents every outcome Dev Loop can report.

## <a id="related-topics"></a>Related Topics

- [Dev Loop CLI](https://vaadin.com/docs/next/flow/configuration/live-reload/dev-loop-cli.md) — the complete command and output reference

- [MCP Server for Vaadin](https://vaadin.com/docs/next/agentic-development/mcp.md) — documentation lookup for AI coding agents

- [Hot Deploy & Live Reload](https://vaadin.com/docs/next/flow/configuration/live-reload.md) — the other ways to get changes into a running application
