Katelyn Lesse, Anthropic’s head of platform engineering, disclosed that the company has completed a full migration of its Messages API from Python to Rust. What makes the project unusual is that when it began, no engineer on the team had any Rust development experience. Claude wrote the vast majority of the code, while human engineers handled system architecture, migration strategy and validation plans. After the overhaul, CPU resource consumption for the relevant services fell by roughly 40% to 50%, and first-token latency improved by about 10% to 20%.

Lesse recounted the process on the Latent Space podcast, which aired on October 27. As API call volumes scaled up, the original Python monolith was increasingly strained on CPU efficiency, and the team concluded that compute capacity would become a bottleneck, so it decided to rewrite the entire Messages API in Rust. Traditionally, a cross-language refactor requires first hiring the right talent and then migrating module by module, a process that often takes years. This time, the team chose a one-shot rewrite, then used shadow traffic to have the old and new implementations process equivalent requests and compare outputs, before switching real traffic over in batches.

Notably, this was not a “translation-style” migration. Lesse stressed that the team deliberately restrained the urge to add new features and positioned the project as a port. Other teams outside the migration group continued developing features for the original API, and the migration team had to keep pace with those changes and use static analysis and other tools to ensure that new features in the Python version had corresponding implementations in the Rust version. She acknowledged that in the past she would not have allowed her team to take this one-shot rewrite path, but this time the project genuinely succeeded.

MetricBeforeAfterCPU resource consumptionBaselineDown about 40%–50%First-token latencyBaselineImproved about 10%–20%Team Rust experienceNoneMembers gradually gained proficiency, with additional hiring

Note: Data provided by Anthropic head of platform engineering Katelyn Lesse in a public interview; figures are company-reported.

The significance of this case goes beyond the performance numbers. It illustrates an emerging division of engineering labor: AI takes on more and more code implementation, while humans focus on architecture design, result validation, reliability and security controls. In a long post published on X on October 26 titled “A Set of New Problems Engineers Need to Solve,” Lesse argued that when agents no longer merely answer questions but run autonomously for extended periods and collaborate with one another, existing infrastructure, identity authentication and authorization, security isolation and monitoring mechanisms will all face new challenges—and these challenges are precisely where software engineers should invest their efforts in the next phase.

In Lesse’s view, an agent is a workload that needs isolation, has independent state and typically runs as a single instance, with operating characteristics markedly different from traditional online services: it may execute complex tasks continuously, or wait for long periods for model inference or tool calls to return results. If every agent permanently occupies its own runtime environment, resource utilization will be low; if resources are released when idle, the problems of state preservation, rapid recovery and rescheduling must be solved. How to balance startup speed, state persistence, isolation strength and resource cost has become a new challenge for agent infrastructure.

Authorization is equally thorny. Lesse distinguishes authentication from authorization: the former answers “who you are,” the latter determines “what you can do.” When agents execute tasks on behalf of users over long periods, or even autonomously create sub-agents, how permissions are allocated, inherited and revoked still lacks mature solutions. If future agents have independent identities rather than being attached to human users, how multiple agents confirm each other’s identity and authorization scope when requesting services from one another is even more of a blank space.

On the security front, she advocates separating an agent’s “brain” from its “hands”: the agent harness—responsible for model calls, tool calls and user interaction—along with session state and access credentials that need to be persisted, should run in trusted infrastructure outside the sandbox; the sandbox is only responsible for executing code and commands generated by the agent. Credentials are stored in a separate vault, and the agent can only see placeholders; real credentials are injected by a proxy only when a request actually leaves the execution environment. Even if an agent falls victim to prompt injection or executes malicious code, the resources an attacker can reach remain limited.

Anthropic’s practice is not an isolated case. The company’s engineering blog previously disclosed that Claude already accounts for more than 90% of internal code contributions, and that code commit volume grew about 12-fold in four months, putting pressure on version control and continuous integration systems designed for human scale. The team built its own version control system called Scion, abandoning Git’s offline assumptions and moving computation such as history queries, commits and merges entirely to the server, with clients keeping only bounded caches. According to its published figures, CI checkout time fell from 31 seconds to 3.5 seconds, creating a new workspace for an agent fell from 7.1 minutes to 5.1 seconds, and infrastructure CPU and memory usage shrank by about 200-fold. The project was completed by a seven-person team over five months, during which a code review system and a fine-grained permissions system were also built.

In the code review stage, the team likewise overhauled its process: all changes first go through Claude pre-review, after which humans decide the intensity of approval based on risk level; sensitive code and CI configuration files require mandatory secondary approval regardless of who submits them, and AI approval records do not count as human approval. Internal data show that the share of PRs producing substantive issue comments rose from 16% to 54%, while the share of PRs requiring rollback fell by more than 40%. The team also established a review convergence mechanism, limiting rounds and comparing only newly added diffs, to avoid an infinite loop between AI writing code and AI reviewing it.

From an industry perspective, this approach is not yet directly replicable for most companies. Scion is explicitly designed only for giant monorepos with tens of thousands of engineers or large-scale agent fleets, and Anthropic says it has no intention of open-sourcing it, though it hopes to work with GitHub, GitLab and the open-source community to bring ideas such as server-side RPC and compositional sparse checkout back to the Git ecosystem. For ordinary teams, the more practical lesson lies in process design: move validation earlier, allocate human effort according to risk tiers, and retain the ability to roll back quickly, rather than simply cutting the review stage.

For investors, these cases offer a window into the cost structure of AI companies. Compute spending is one of the largest variable costs for model companies, and improvements in inference efficiency and server-side resource usage will directly show up in gross margins. Anthropic disclosed in its prospectus that its compute and infrastructure costs as a ratio of revenue rose from about $0.50 in the same period last year to $1.82 in the first half, and further to $2.08 in the second quarter. The extent to which engineering efficiency gains can translate into sustainable profitability still depends on future model R&D spending and the pace of absorbing committed compute deliveries.