# How Anthropic uses Claude Code: Agentic Software Engineering at Scale - Daisy Hollman

## Executive summary

This talk details the engineering challenges and advanced primitives required for achieving agentic software engineering at scale, particularly within large monorepos. The core thesis is that scaling agents requires sophisticated context management—moving beyond simply increasing model size to implementing abstractions like Skills, Sub-agents, and Hooks. Key focus areas include managing limited context windows (currently around 1 million tokens) by ensuring tools and knowledge are only injected when relevant, thereby enabling complex, long-horizon tasks across massive codebases.

## Key takeaways

- Context Engineering is the New Discipline: As agents become better at writing software, teaching them how to do it—managing context—is becoming the primary discipline of software engineering. This involves carefully selecting and injecting relevant information into the model's limited context window (the 'box').
- Scaling Requires Abstraction Primitives: To handle massive codebases, simple tool definitions are insufficient. Advanced primitives like Skills (lazy system prompts), Sub-agents (out-of-context processing), and Hooks (event-driven execution) are necessary to ensure that only relevant information is consumed by the model.
- The Importance of Feedback Loops: The fastest way to improve an agent's performance on a codebase is not necessarily a smarter model, but implementing tighter feedback loops (e.g., type checking, linting) that provide immediate, granular error detection during the tool-use process.
- Scaling Workflows Beyond Single Sessions: For enterprise use, scaling requires managing multiple concurrent agent sessions. Techniques like using dedicated worktrees and visual cues (e.g., color coding) are essential to manage cognitive load and maintain persistent agent identities across different tasks.

## Technical details

- Agent vs. Chatbot: Agents evolve from simple chatbots by incorporating tool calling, allowing the model to execute external actions (e.g., shell commands, file edits) and make subsequent decisions based on the results, forming a loop of increasing autonomy.
- The Edit Tool Primitive: The core mechanism for code modification is the 'edit tool,' which requires specifying the old string, the file name, and the new string. This primitive is described as highly structured (e.g., requiring byte-for-byte matching) and foundational to agentic tooling.
- Context Window Constraints: The context window size remains a major bottleneck; while model capabilities have exploded, the state-of-the-art models are still around 1 million tokens. This necessitates 'don't pay for what you don't use' principles when customizing context.
- Plugin Abstractions (MCP/Skills/Hooks): Plugins must scale beyond simple tool definitions. The Multiple Client Protocol (MCP) server adds schemas to the system prompt, but this fails at scale due to token bloat. Skills and Hooks are preferred because they operate lazily or outside the context window, only injecting text when triggered by an event.
- KV Cache Constraint: The Key-Value (KV) cache mechanism for next token prediction is a critical constraint; predicting tokens based on previous inputs is computationally expensive. This complexity makes simple caching mechanisms insufficient, requiring advanced architectural solutions.

## Practical implications

- Design tooling to minimize context window usage by implementing lazy loading or event-driven hooks rather than dumping all available knowledge.
- Structure agent workflows using dedicated worktrees and persistent identities to manage cognitive load when switching between multiple concurrent tasks.
- Focus on building robust feedback mechanisms (like linting/type checking) that provide immediate, in-context error detection for agents.
- Treat the development environment itself—including internal documentation and CI dashboards—as critical knowledge sources that must be programmatically accessible to the agent.

## Topics

AI, Agentic Programming, Software Engineering, Context Management, Build Tools, LLMs, Claude Code, Anthropic, MCP Server, Skills, Sub-agents, Hooks

Source: https://www.youtube.com/watch?v=shZgedW15vg
