# Claude Code Is A State Machine

By Rajdeep Mondal. Published 2026-04-20. 6 min read

Canonical: https://www.rajdeepmondal.com/writing/claude-code-is-a-state-machine

Tags: Agents, Claude Code, AI Systems

> Claude Code is a machine that loops through model calls and tool results. It stops at one of a fixed list of endings. It reads what came back rather than the label on it. Hold that picture and the rest gets simpler.

Read the interactive essay: https://www.rajdeepmondal.com/writing/claude-code-is-a-state-machine
