Welcome
This site contains learning material on the claude-code codebase prepared mainly for COMS4995: AI for Software Security at Columbia University.
It is intended for this class rather than for a general audience, so the presentation is intentionally simple and focused.
I have tried to make the material fairly accessible, while intentionally leaving some parts a bit challenging so that you can think through the design and code more deeply on your own.
How to use this site
The best way to use this material is to read it alongside the source code. Whenever you see a code snippet, please refer back to the actual source and try to understand what the function is doing in context.
How the site is organized
The site is organized as a structured reading path, so you can build understanding step by step instead of treating the codebase as a flat list of files.
In general, parent pages give the big picture, and child pages go one step deeper into the same branch.
What this material is for
The goal of this material is to help you build a mental model of how Claude Code is designed.
It is also intended to help you prepare for the upcoming presentations and, hopefully, to encourage you to explore the codebase further on your own.
A small note
Some of the text was generated with Codex, so there may still be mistakes. I have reviewed the content carefully, but I cannot guarantee that everything is fully error-free.
If you find anything confusing or uncertain, please note it down or send me an email.
Recommended first path
If you are not familiar with the codebase, read these pages in order:
overall-architecturestartup-and-boot-sequenceinteraction-shell-and-app-statecontext-and-prompt-constructionthe-query-engine-and-turn-lifecycle
After that, branch into the root chapter that matches your interest:
tools-and-permission-modeltasks-agents-and-background-executioncommands-and-user-controlextensions-skills-plugins-and-mcpremote-bridge-and-connected-modesservices-behind-the-scenes
Takeaways
- Read this site alongside the source code, rather than in isolation.
- Use each code snippet as a pointer back to the real implementation and its surrounding context.
- Build understanding branch by branch, from the big picture to deeper details.