Production coding agents do not need complex orchestration frameworks to run reliably. When Anthropic shipped Claude Code to npm with source maps attached, it exposed an architecture driven by a single asynchronous generator that coordinates streaming, tool execution, and context compression across four distinct layers.
The execution pipeline handles tool requests through a fourteen-step sequence that isolates permissions, performs speculative execution, and batches calls concurrently based on safety classifications. Rather than relying on a heavy vector database, the runtime uses simple file-based memory backed by structured side-queries, which surprisingly outperform embeddings for local code recall.
For multi-agent workflows, coordinator and worker agents share exact prompt cache prefixes. This prefix alignment slashes token input costs by ninety-five percent across swarm sub-agents while preserving execution isolation.
Reliable agent engineering is less about prompt magic and more about defensive systems programming.









