What's Happening?
Algirdas Medeikis, a developer on Hostinger’s Innovations team, investigated a recurring issue where his AI agents, specifically Claude Code, were crashing due to excessive memory consumption. Initially, Medeikis suspected that running multiple Chrome
instances for agent verification was the cause, as each agent used a headless Chrome browser to check its work. However, further investigation, aided by a fresh AI agent acting as a 'partner,' revealed that Chrome was not the primary culprit. Instead, the memory-intensive operations were the typecheck, consuming approximately 10 GB, and the tests, which used up to 15 GB. Medeikis's laptop, with 32 GB of RAM, was being overwhelmed by these processes, particularly because the test runner initiated 19 workers for its 20 processor threads, leading to frequent system shutdowns by the memory enforcer. This discovery shifted the focus from the number of agents to the resource demands of their individual verification steps.
Why It's Important?
This case highlights a critical challenge in deploying and scaling AI agents, particularly in development and operational environments. The unexpected memory demands of routine verification processes like typechecks and tests can severely limit the efficiency and stability of AI-driven workflows. For businesses relying on AI agents for repetitive tasks, such as code migration or data processing, understanding and optimizing resource allocation is paramount. Inefficient memory usage can lead to frequent crashes, increased downtime, and a significant drain on developer time for manual intervention and debugging. The findings underscore the need for robust monitoring and intelligent resource management strategies to ensure that AI agents can operate reliably and at scale, preventing bottlenecks and maximizing productivity in AI-powered development cycles.
What's Next?
Following the identification of the true memory culprits, Medeikis implemented several changes to optimize the AI agent workflow. He reduced the number of test workers and configured the system to offload heavy computational tasks, such as extensive test runs, to a remote machine designated as a 'safehouse.' Additionally, he ensured that these operational rules were integrated into the global agent instructions, making them accessible to all agents upon startup. This proactive approach aims to prevent future memory-related crashes and improve the overall stability and speed of agent operations. The experience also led Medeikis to adopt a 'measure before blaming' philosophy, emphasizing data-driven diagnostics over initial assumptions when troubleshooting AI agent performance issues. This shift in methodology is likely to influence future development practices at Hostinger and potentially serve as a model for other organizations deploying AI agents.
Beyond the Headlines
The incident at Hostinger reveals a deeper implication regarding the interaction between human-designed processes and autonomous AI agents. Medeikis's initial routine, which included three checks for every job, was meticulously designed for thoroughness. However, when scaled with multiple AI agents executing these checks concurrently, this very routine became the 'killer' of system performance. This illustrates a fundamental challenge in AI deployment: what is efficient and manageable for a single human or agent can become a significant bottleneck when parallelized without careful consideration of resource implications. It also highlights the 'black box' nature of some AI operations, where agents may follow instructions literally without an inherent understanding of system-wide resource constraints. The solution involved not just technical adjustments but also a re-evaluation of how instructions are communicated to and interpreted by AI agents, moving from informal notes to structured, globally accessible rules. This points to an evolving need for more sophisticated governance and oversight mechanisms for autonomous AI systems.













