[KongchangAI]
· 2 min read· 1,101 words

LangGraph vs. Claude Code: How to Choose the Right AI Development Workflow

LangGraph vs. Claude Code: How to Choose the Right AI Development Workflow

LangGraph locks down repeatable workflows; Claude Code + harness suits exploratory feature dev — use both strategically.

This article explores a real engineering team's dilemma: why a predefined LangGraph workflow failed to dominate local development, while Claude Code/Codex with a harness became the default. The core finding is that the two paradigms serve different purposes — LangGraph's deterministic graph structure excels at locking down known, repeatable processes like BAU and maintenance pipelines, while agent-based tools with soft constraints (static analysis, rules, skills) are naturally better suited to exploratory feature development where paths can't be exhaustively predetermined. A hybrid approach, using each tool where it fits best, is the most pragmatic solution.

A Real Team's Dilemma

A company in the process of AI-ifying its engineering workflow recently tried using LangGraph to build development pipelines for web features and business-as-usual (BAU) maintenance tasks. Their goal was straightforward: have every developer plug into a predefined LangGraph flow to complete development work.

But after digging into how things actually worked in practice, the person asking the question noticed something interesting — despite LangGraph's ability to orchestrate workflows with precision, what actually dominated day-to-day development was Claude Code and Codex, paired with extensive "harnesses." This raises a question worth every engineering team's consideration: Why hasn't the more deterministic LangGraph workflow become the go-to approach for local development?

Reddit discussion thread

The Core Difference Between Two Paradigms

To answer this question, it helps to clarify where each approach is really meant to live.

LangGraph: A Deterministic Orchestration Engine

LangGraph's core strength is process determinism. It abstracts development steps into nodes and edges in a graph, explicitly defining what happens first, what comes next, and when to branch. This approach works well for:

  • Customer-facing LLM features that require stable, predictable behavior
  • Repetitive BAU and maintenance work with standardized, low-variance processes
  • Build pipelines that need to be auditable and reproducible

In short, LangGraph excels at "locking down known, repeatable processes." When task boundaries are clear and steps are well-defined, it ensures every run follows the same track.

LangGraph is an orchestration framework in the LangChain ecosystem. Built on a directed graph model, it abstracts LLM calls, tool calls, and conditional logic into nodes and edges. Unlike traditional linear chains, it natively supports loops and conditional branching, enabling patterns like retries, reflection, and multi-agent collaboration within a controlled framework. Its persistence mechanism can save and restore state at any node, making it easy to implement human-in-the-loop approval steps — a key reason it's favored in enterprise build pipelines with compliance requirements. Understanding this underlying design helps identify its limits: the more structured and branch-limited a process, the more LangGraph shines; conversely, when branches can't be exhaustively enumerated, the cost of maintaining the graph structure quickly outweighs the benefits.

Claude Code / Codex + Harness: Non-Deterministic Intelligent Agents

The other approach is the polar opposite. Developers use Claude Code or Codex alongside project-level scaffolding — static analysis, rules documents, guides, and skills that simplify tasks — letting AI agents make autonomous decisions within a constrained but flexible space.

The key word here is non-deterministic. Skills define capabilities and boundaries, not a fixed execution sequence. The AI dynamically decides which capabilities to use and in what order, based on current context. This is exactly the dominant pattern the original poster observed.

In the context of AI-assisted development, a "harness" refers to a system of external constraints and capability extensions built around an AI agent — not the test stubs known from testing contexts. Typical components include: static analysis tools (e.g., ESLint, Pyright) that automatically validate code quality after generation; rules/guides documents that communicate team conventions, architectural decisions, and prohibited actions to the AI in natural language; and skills (also known in Claude Code as "slash commands" or "custom commands") that package common multi-step operations into reusable instructions the AI can call on demand. The essence of this combination is "soft constraints": rather than prescribing execution order, it defines behavioral boundaries and lets the AI agent plan its own path within them. The quality of the harness directly determines the consistency of the agent's output, which is why carefully maintaining rules and skills is a critical investment for this approach.

Why Rigid Workflows Struggle to Dominate Feature Development

The core of the original question is: if predefined steps sound more structured, why hasn't LangGraph caught on for local development? The answer likely lies in the word "rigid."

Feature Development Is Inherently Exploratory

Real feature development rarely lends itself to complete upfront modeling. Requirements shift, edge cases keep emerging, and refactoring and debugging are woven throughout. This kind of work feels more like a continuous exploration than an assembly line. Forcing exploratory tasks into a fixed graph structure typically runs into two problems:

  1. High coverage cost: Every unanticipated branch requires adding new nodes and conditional logic to the graph, and maintenance burden escalates quickly.
  2. Limited flexibility: When reality diverges from the preset path, a rigid workflow either breaks down or produces outputs that don't meet expectations.

Agent-based tools like Claude Code are naturally suited to these ambiguous, ever-changing scenarios — you don't need to enumerate all possible paths in advance; you just need to provide good constraints and context.

Harnesses Provide "Soft Constraints"

One nuance worth expanding on: Claude Code + harness is not a free-for-all. Static analysis catches low-quality code, rules and guides steer AI behavior, and skills encapsulate common operations. This combination is fundamentally about replacing hard orchestration with soft constraints — preserving flexibility without losing control.

This may be the fundamental reason it's more popular with practitioners than LangGraph: it finds a balance between determinism and flexibility that better suits the rhythms of everyday development.

Trade-offs at a Glance

DimensionLangGraph WorkflowClaude Code/Codex + Harness
Execution styleDeterministic, reproducibleNon-deterministic, context-driven
Best fitBAU, maintenance, customer-facing LLM featuresFeature development, exploratory tasks
FlexibilityLow — paths are fixedHigh — dynamic decision-making
Maintenance costGrows with number of branchesDepends on harness quality
ControllabilityStrong — process is auditableMedium — enforced through soft constraints

Practical Recommendations for Teams

What emerges from this discussion isn't a binary choice: both paradigms have their home turf, and using them together is often the wiser move.

For standardized, high-repetition build and maintenance pipelines that demand strong controllability, LangGraph's deterministic orchestration is a genuine asset. For feature development driven by shifting requirements and exploration, Claude Code/Codex paired with a well-designed harness delivers better efficiency.

If you do want to bring LangGraph into local development, the key question isn't "whether to use it" but "where to use it." Apply it to the most standardized parts of your process, and leave the exploratory space for agent-based tools — that's likely the most pragmatic answer available today.

A note on context: this article is based on a Reddit discussion thread and reflects the observations and thinking of practitioners in the community, not a rigorous quantitative comparison. Every team's tech stack and working habits differ, so any tooling decision should ultimately be validated against your own situation.

#LangGraph#Claude Code#AI development workflow#agentic coding#LLM orchestration#Codex harness#AI engineering
Share:

Related articles