Managing Multiple Codebases with Claude Code - Swift, Python, TypeScript in One Project
Managing Multiple Codebases with Claude Code
Building Fazm means working across three languages simultaneously. The macOS app is Swift. The AI backend is Python. The website and dashboard are TypeScript. They all talk to each other through APIs and shared data formats.
The hardest part is not writing code in three languages. It is keeping the AI assistant aware of how changes in one codebase affect the others.
The Cross-Codebase Problem
You change a Python API endpoint's response format. Now the Swift app's decoder breaks. Claude Code does not automatically know about this because it is working in the Python project. By the time you switch to the Swift project and ask it to fix the build error, it has no context about what changed on the backend.
The fix is documentation. A shared CLAUDE.md file that describes the API contract between components. When the Python endpoint changes, you update the spec, and the Swift-side Claude session reads the updated contract.
Practical Workflow
Run separate Claude Code sessions for each codebase. Do not try to cram everything into one massive context window. Each session gets its own CLAUDE.md with language-specific conventions and cross-references to shared contracts.
For shared types, maintain a single source of truth. We use JSON Schema files that both the Python and Swift codebases reference. When the schema changes, both sides know about it.
What Works
- Dedicated
CLAUDE.mdper codebase with clear API contracts - JSON Schema as the shared type system
- Running parallel Claude Code sessions in separate tmux panes
- Committing API changes with clear descriptions that the other session can reference
What Does Not Work
- Asking one session to "also fix the Swift side" when it is in the Python project
- Relying on the model to remember cross-project details between sessions
- Skipping the documentation step because "it is just a small change"
Every small undocumented change becomes a debugging session later.
Fazm is an open source macOS AI agent. Open source on GitHub.