---
title: "Discussion on \"Java Patterns and Anti-Patterns for Agent-Driven Development. Part 2: Early Error Detection Patterns\" | Hashnode"
description: "Discussion on \"Java Patterns and Anti-Patterns for Agent-Driven Development. Part 2: Early Error Detection Patterns\". Patterns for  LLM agents: @CheckReturnValue, immutability, explicit SQL, Resilience4j, ArchUnit. The error is visible to the compiler, not in production."
url: "https://hashnode.com/posts/java-ai-patterns-en-2/6a0f1864d8e265f60d241346"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Java Patterns and Anti-Patterns for Agent-Driven Development. Part 2: Early Error Detection Patterns](https://krocodl.hashnode.dev/java-ai-patterns-en-2?utm_source=hashnode&utm_medium=feed)

Patterns for LLM agents: @CheckReturnValue, immutability, explicit SQL, Resilience4j, ArchUnit. The error is visible to the compiler, not in production.

May 21 · 41 min read · krocodl.hashnode.dev  
Updated Jun 1  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#agentic-ai-development](https://hashnode.com/tag/agentic-ai-development)
-   [#llmagents](https://hashnode.com/tag/llmagents)
-   [#claude-code](https://hashnode.com/tag/claude-code)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#code-structure](https://hashnode.com/tag/code-structure)
-   [#software-design](https://hashnode.com/tag/software-design)
-   [#software-development](https://hashnode.com/tag/software-development)

## Written by

[Victor Alekseev](https://hashnode.com/@krocodl)

@krocodl · Luxembourg

  
[View profile](https://hashnode.com/@krocodl)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
