Claude Code source code reportedly leaked, revealing agent architecture details

The source code for Claude Code, Anthropic's AI-powered coding assistant, appears to have been leaked according to reports from the r/LocalLLaMA community. The leak reportedly contains the complete repository, not just decompiled code or wrapper implementations.
What's in the leaked code
Based on initial analysis from community members who have examined the code:
- The system prompts are detailed with multiple constraints designed to prevent Claude from making inappropriate multi-file edits
- The agent loop implementation is more complex than expected, not just a simple call loop
- Internal tooling infrastructure is included that hasn't been publicly documented before
The leak appears to contain the actual production code structure, including the agent's decision-making loop and how it interfaces with development tools. Community members anticipate that GitHub will see numerous open-source clones appearing in the coming days now that the code is publicly accessible.
For developers building local AI coding agents, this provides an opportunity to examine how Anthropic structured their implementation, particularly around multi-file editing constraints and tool calling mechanisms. The leak comes at an awkward time for Anthropic as Claude Code was positioned as a competitor to tools like Cursor.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Slack Rate Limit Changes Break OpenClaw Context Retrieval
Slack changed rate limits on March 3rd, restricting conversations.history and conversations.replies to 1 request per minute with 15 messages max for non-Marketplace apps. This causes OpenClaw agents to lose 85% of their context window.

PS3 Emulator Devs Ask Devs to Stop Submitting AI-Generated PRs
RPCS3 maintainers have publicly requested users stop submitting pull requests generated by AI code agents, citing low quality and maintenance burden.

Research shows personality affects Claude's self-correction, not Llama or Qwen
A researcher ran 23 experiments testing self-correction without guardrails across Claude, Llama, and Qwen. The main finding: personality profiles affect Claude's self-correction ability, with high directness catching all errors and low directness catching none. Llama and Qwen didn't self-correct even with identical prompts.

US Job Losses Tied to AI Exposure Begin Mounting, Bloomberg Reports
Bloomberg reports that the US is seeing significant job losses in roles exposed to AI, with a Hacker News discussion pointing to real-world impact on developers and other knowledge workers.