How Claude Code’s Agentic Loop Works: Four Layers from QueryEngine to UI
The article breaks down Claude Code’s persistent agentic loop into four layers—QueryEngine, Tool System, Permission/Hook, and React + Ink—explaining how each turn gathers context, makes model decisions, executes actions, verifies results, handles errors, and renders a terminal UI.
