# Migrating to Quarkus 4: quarkus update and the coding agent

> December 3, 2026 · https://eldermoraes.com/migrating-to-quarkus-4-quarkus-update-and-the-coding-agent/

On November 25, the Quarkus team [announced Quarkus 4.0](https://quarkus.io/blog/quarkus-4-0-released/), the framework's new major version. 4.0.1 came out the same day. Quarkus 4 requires Java 21 (Java 25 is the recommended one), moves the networking layer to Vert.x 5 and Netty 4.2, and switches to Jackson 3 and Hibernate ORM 8. The announcement also says that Quarkus Agent MCP is now the recommended way to use AI coding agents with Quarkus.

In this post I'll talk about migrating an application that is on 3.x. I'll show what `quarkus update` handles on its own, what it leaves to you, and where the coding agent helps.

## If you are on 3.x, you have time

The announcement acknowledges that moving to 4.0 will take work and testing. The two LTS releases of version 3 keep getting bug and CVE fixes: 3.40 until the end of September 2027, and 3.33 until the end of March 2027. You can plan the migration without rushing.

According to the announcement, these are the changes most likely to affect an application: Java 21 as the minimum version, Vert.x 5 (if you use the Vert.x APIs directly or the reactive SQL clients), the changes in the gRPC extension, Jackson 3, the new major versions of Hibernate ORM, Hibernate Reactive and Hibernate Search, and the new OpenTelemetry defaults. On Jackson, the text is direct: "This change is very likely to affect applications moving to Quarkus 4, as the Jackson API changed a lot and some defaults changed in subtle ways."

## What quarkus update does

This is the migration command:

```
quarkus update --stream=4.0
```

Without the CLI, the Maven plugin does the same:

```
./mvnw io.quarkus.platform:quarkus-maven-plugin:4.0.1:update -N -Dstream=4.0
```

`quarkus update` relies mainly on OpenRewrite recipes, maintained in the [quarkus-updates](https://github.com/quarkusio/quarkus-updates) repository. In the [4.0 migration guide](https://github.com/quarkusio/quarkus/wiki/Migration-Guide-4.0), the items the command handles on its own carry the ⚙️ ✅ mark. The [update guide](https://quarkus.io/guides/update-quarkus) warns that the command automates only part of the migration and that you need to read the guide for the target version.

To see this in practice, I built a minimal application on Quarkus 3.40.2, with `quarkus-rest-jackson`. It has a record, an endpoint that receives that record, and a class that uses the `ObjectMapper` directly:

```java
public record Order(String id, int quantity) {}
```

```java
@Path("/orders")
public class OrderResource {

    @POST
    public String receive(Order order) {
        return order.id() + ":" + order.quantity();
    }
}
```

```java
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.enterprise.context.ApplicationScoped;

@ApplicationScoped
public class OrderReader {

    private final ObjectMapper mapper;

    public OrderReader(ObjectMapper mapper) {
        this.mapper = mapper;
    }

    public Order read(String json) throws JsonProcessingException {
        return mapper.readValue(json, Order.class);
    }
}
```

The tests passed on 3.40.2. Then I ran the update with the Maven plugin. It found three recipe files for the jump from 3.40.2 to 4.0.1 and changed `pom.xml` and `OrderReader`. In `pom.xml`, the BOM went to 4.0.1, `quarkus-junit5` became `quarkus-junit`, and the `tools.jackson.core:jackson-databind` dependency was added. In the code, the Jackson recipe changed the package and removed the `throws`:

```java
import tools.jackson.databind.ObjectMapper;
import jakarta.enterprise.context.ApplicationScoped;

@ApplicationScoped
public class OrderReader {

    private final ObjectMapper mapper;

    public OrderReader(ObjectMapper mapper) {
        this.mapper = mapper;
    }

    public Order read(String json) {
        return mapper.readValue(json, Order.class);
    }
}
```

The `throws` went away because, in Jackson 3, all Jackson exceptions are unchecked. `JsonProcessingException` became `JacksonException`, which extends `RuntimeException`. The recipe behind these changes is Quarkus's `Jackson3Migration`, which applies OpenRewrite's own Jackson 2 to 3 migration. The project compiled on 4.0.1 without me touching anything.

## What compiles and still behaves differently

The migration guide separates the package rename from another part: the change in defaults. Some Jackson behaviors changed between version 2 and 3, and Quarkus offers a configuration property for each one. Two of them matter here. In Jackson 3, reading fails when there is content left after the value that was read (`quarkus.jackson.fail-on-trailing-tokens`). It also fails when `null` arrives for a primitive type (`quarkus.jackson.fail-on-null-for-primitives`). In Jackson 2, both were off. Quarkus 4 follows Jackson 3 on these two. On two others, `fail-on-empty-beans` and `write-durations-as-timestamps`, Quarkus keeps the Jackson 2 behavior so existing applications don't break.

None of this shows up at compile time, only in the tests. The application had these two tests, among others:

```java
@Test
void nullQuantity() {
    given().contentType("application/json")
            .body("{\"id\":\"A2\",\"quantity\":null}")
            .when().post("/orders")
            .then().statusCode(200).body(is("A2:0"));
}

@Test
void contentAfterTheObject() {
    given().contentType("application/json")
            .body("{\"id\":\"A3\",\"quantity\":1} {\"id\":\"A4\"}")
            .when().post("/orders")
            .then().statusCode(200).body(is("A3:1"));
}
```

On 3.40.2, both passed. The null quantity became 0, and the second object in the body was dropped without any warning. On 4.0.1, after the update, three of the four tests failed:

```
[ERROR]   OrderResourceTest.contentAfterTheObject:33 1 expectation failed.
Expected status code <200> but was <400>.
[ERROR]   OrderResourceTest.nullQuantity:25 1 expectation failed.
Expected status code <200> but was <400>.
[ERROR]   OrderReaderTest.nullQuantity:17 » MismatchedInput Cannot map `null` into type `int` (set `DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES` to 'false' to allow)
[ERROR] Tests run: 4, Failures: 2, Errors: 1, Skipped: 0
```

The endpoint started answering 400 for both bodies, and `OrderReader` started throwing `MismatchedInputException`. With the two properties in `application.properties`, all four tests passed again:

```
quarkus.jackson.fail-on-null-for-primitives=false
quarkus.jackson.fail-on-trailing-tokens=false
```

I wouldn't turn these properties on for the whole project just to get a green build. A client that sends `null` as a quantity, or two objects in a single body, probably has a bug that Jackson 2 was hiding. Choosing between the new default and the old one is a decision for each API. What matters is making that choice while looking at the test that failed, before the deploy.

## Where the agent comes in

`quarkus update` covers what a recipe can transform. The rest of the migration is the usual work: read the guide, run the tests, understand why one of them failed, and decide what to do. This is the part where a coding agent helps, as long as it knows which version the project is on.

In June, in a [post about the skills inside Quarkus 3.37 extensions](https://eldermoraes.com/quarkus-3-37-0-cr1-extensions-start-teaching-the-ai-coding-agent/), I wrote that the agent often learns from a source that doesn't match what's in your `pom.xml`. In a major version migration, I think this problem gets bigger, because most of what the model has seen about Quarkus is probably from version 3, with Jackson 2.

The [Agent MCP guide](https://quarkus.io/guides/agent-mcp) lists what it gives the agent, and several of these things help with the migration:

- the documentation search uses the project's Quarkus version;
- the skills come from the extensions the project uses. Each extension can publish its own in a `quarkus-skill.md` file, with coding patterns, testing guidelines and common pitfalls;
- the agent has access to the Dev MCP tools of the running application, and among them are the ones that run the tests;
- Agent MCP checks whether the project is up to date and produces an upgrade report. According to the guide, it can also preview the migration before applying it, with `quarkus update --dry-run`.

The announcement also says that Agent MCP is still there when the application fails to start. That happens during a migration, and the agent can still read the application's logs.

To use it with Claude Code, for example, the guide gives this command (it needs JBang installed):

```
claude mcp add quarkus-agent -- jbang quarkus-agent-mcp@quarkusio
```

One detail: the guide still marks Agent MCP as experimental, and `quarkus update` is also marked as experimental in its own guide.

## The order I would follow

The update guide already has a procedure, and I would follow it with the agent alongside. First, a new branch. Then `quarkus update --stream=4.0` and a read of the diff it produced. Next, the migration guide, looking for what the project uses and what doesn't carry the ⚙️ ✅ mark. Last, the build and the tests, which must pass before any deploy.

The agent with Agent MCP comes in at the last two steps, with the 4.0 documentation and skills and with the tests running in dev mode. The tests are what tell you the migration is done. In my minimal application, the code compiled after the update, and the behavior change only showed up because there was a test sending `null` and a test sending extra content. If your test suite doesn't cover the odd cases in the JSON that reaches your APIs, I would start the migration by writing those tests while still on 3.x.

## References

- Guillaume Smet, [Quarkus 4.0, our new major release, is here!](https://quarkus.io/blog/quarkus-4-0-released/), Quarkus blog, November 25, 2026.
- Quarkus, [Migration Guide 4.0](https://github.com/quarkusio/quarkus/wiki/Migration-Guide-4.0), quarkusio/quarkus wiki on GitHub.
- Quarkus, [Update projects to the latest Quarkus version](https://quarkus.io/guides/update-quarkus), Quarkus guide.
- Quarkus, [Quarkus 4.0 recipes (core/4.0.alpha1.yaml)](https://github.com/quarkusio/quarkus-updates/blob/main/recipes/src/main/resources/quarkus-updates/core/4.0.alpha1.yaml), quarkusio/quarkus-updates repository.
- FasterXML, [Migrating to Jackson 3](https://github.com/FasterXML/jackson/blob/main/jackson3/MIGRATING_TO_JACKSON_3.md), FasterXML/jackson repository.
- Quarkus, [Agent MCP](https://quarkus.io/guides/agent-mcp), Quarkus guide.
- Quarkus, [quarkus-agent-mcp](https://github.com/quarkusio/quarkus-agent-mcp), GitHub repository.
- Quarkus, [4.0.1 release](https://github.com/quarkusio/quarkus/releases/tag/4.0.1), GitHub, November 25, 2026.
- Elder Moraes, [Quarkus 3.37.0.CR1: extensions start teaching the AI coding agent](https://eldermoraes.com/quarkus-3-37-0-cr1-extensions-start-teaching-the-ai-coding-agent/), eldermoraes.com, June 23, 2026.
