A deep architectural walkthrough of CodeAlta, an open-source AI coding agent CLI built in .NET. Covers the core ReAct loop, context compaction strategy, prompt composition (including AGENTS.md/CLAUDE.md discovery), tool invocation, provider abstraction via ILocalAgentTurnExecutor and IChatClient, event-sourced conversation storage, multi-thread orchestration, and the now-removed Agent Client Protocol (ACP). The author also shares first-hand challenges: broken provider SDKs, WebSocket protocol gaps, and the 200+ hours of iteration needed to turn a working demo into a reliable agent. Key takeaway: what separates a production agent from a demo is engineering around failure — compaction, overflow recovery, deterministic tooling — not model choice.