4.5 Local vs Cloud Execution
Course: Claude Code - Essentials Section: Claude Desktop App Video Length: 2-5 minutes Presenter: Daniel Treasure
Opening Hook
Claude Code does two different kinds of work: local execution (running on your machine) and cloud execution (reasoning in Anthropic's cloud). Understanding which tasks run where helps you work more efficiently and make informed decisions about data sensitivity. This video explains the distinction and why it matters.
Key Talking Points
1. Local Execution (Your Machine)
Explain what runs locally: - File reading: Accessing and indexing your project files - File editing: Actually modifying code files on your disk - Shell commands: Running npm, git, build commands, tests on your system - System integration: Using your environment variables, local tools, and setup
What to say: "Local execution means Claude is running commands on your computer—building your project, running tests, checking git status. This is fast and uses your local environment, exactly like you'd run commands in a terminal."
What to show on screen: Show a file being edited (from a previous video) or a bash command being run (like npm test). Highlight that the command output appears in the UI. Total: 30-45 seconds.
2. Cloud Execution (Reasoning in the Cloud)
Explain what happens in Anthropic's cloud: - AI reasoning: Claude analyzing your code, suggesting patterns, debugging logic - Context processing: Making sense of large codebases, understanding relationships - Model inference: The actual language model generating responses - No file modification: Cloud execution can't directly edit your files; it only analyzes and suggests
What to say: "Cloud execution is the AI part. Claude thinks about your code, understands the architecture, spots bugs, and suggests fixes—all in Anthropic's cloud. Your code is sent for analysis, not stored."
What to show on screen: Show Claude's response to a question about code (e.g., "What does this function do?"). Explain that the reasoning happens in the cloud, but the results come back to you. Total: 30-45 seconds.
3. Why the Split Matters (Efficiency & Security)
Explain the practical implications: - Speed: Local tasks (file I/O, running tests) are fast because they're local. Cloud tasks may take a second or two longer but are more powerful. - Data sensitivity: Your source code is read locally; only necessary context is sent to the cloud for analysis. You can always review what's being sent. - Control: You control what shell commands run. You approve edits before they're applied. Cloud reasoning can't act without your permission. - Offline capability: Some file operations and edits can work without cloud access, but full reasoning requires the cloud.
What to say: "The split gives you the best of both worlds: speed from running locally, and power from AI reasoning in the cloud. And you're always in control—Claude asks for permission before editing or running commands."
What to show on screen: Show a dialog asking for permission to run a command or approve an edit. Explain that this is where you maintain control. Total: 20-30 seconds.
4. When to Choose Local vs Cloud (Best Practices)
Guide viewers on thinking about workloads: - Use local for: Quick file edits, running your build/test suite, git operations, environment-specific setup - Use cloud for: Understanding complex code, debugging issues, refactoring strategy, generating solutions - Pro tip: Most workflows combine both. You ask Claude (cloud) to suggest a fix, then Claude (local) runs your tests to verify
What to say: "You don't usually choose one or the other. Claude uses both automatically. File edits run locally, thinking happens in the cloud, and results come back to you. The nice part is you don't have to think about it—Claude handles it intelligently."
What to show on screen: Diagram or text showing the workflow: Question → Cloud reasoning → Proposed change → Local execution (edit/test) → Results. Keep it simple. Total: 30-45 seconds.
5. Data Privacy (Important Context)
Address the elephant in the room: - Your code is read locally: Claude accesses your files on your machine first - Context is sent to the cloud for reasoning: To analyze your code, some context must be sent to Anthropic's API - Review before sending: Check the "About" or "Settings" to see what data is being sent (or ask in the conversation) - Sensitive data: If you're concerned about sending proprietary code to the cloud, use Plan Mode to see what Claude would do without sending code
What to say: "Your code is always your code. We read it locally first, then send necessary context to our cloud to reason about it. You're always in control. If you're concerned about data sensitivity, you can use Plan Mode to see what Claude suggests before sending anything."
What to show on screen: Optionally show a settings or "About" dialog that might indicate data handling. Or just explain verbally that data is treated securely. Total: 20-30 seconds.
Demo Plan
Use a project with a simple file and a runnable test/build command:
- Show a file in the file browser (e.g., app.js)
- Ask Claude a question about it (e.g., "Explain this function")
- Explain: The question is processed in the cloud; the response comes back
- Type a request for a change (e.g., "Add input validation to this function")
- Show Claude's proposed edit in a diff or suggestion
- Approve the edit (show the local file being modified)
- Run a test command (e.g.,
npm testorpython -m pytest) - Explain: The test runs locally; the output appears in Claude Code
This demos the split without being too technical.
Total screen time: 2-3 minutes.
Code Examples & Commands
Show a sample bash command running locally:
npm test # Runs on your machine
npm run build # Runs on your machine
git status # Runs on your machine
Explain that Claude sends code/context to the cloud for:
Analyzing code structure
Suggesting refactors
Understanding bugs
Generating solutions
Gotchas & Tips
- Cloud execution isn't always slower: For small, local tasks (quick file edits), local is instant. For large reasoning tasks, cloud is actually faster and more capable.
- You can't disable cloud reasoning: If you want full Claude Code functionality, cloud execution is necessary. Plan Mode is the alternative if you're concerned about privacy.
- Your API quota affects cloud reasoning: If you're on a Pro plan, cloud reasoning is included. If you're on Console (API), you pay per token. Be aware of costs.
- Interrupting is safe: If you're concerned about what's being sent to the cloud, you can stop a task before approving it. Just don't approve the suggested change.
- Test locally first: Always run your tests locally to catch issues early. Don't rely solely on cloud analysis.
Lead-out
"Now you understand how Claude Code balances local execution and cloud reasoning. The final piece is managing your work across multiple sessions. In the next video, we'll show you how to create, resume, and organize sessions."
Reference URLs
- Claude Code Overview - Execution Model
- Claude Code Documentation - Settings (data handling section)
- Anthropic Privacy Policy (if needed for detailed data info)
Prep Reading
- Official Claude Code documentation on how local and cloud execution work
- Anthropic blog posts on data handling and privacy
- Community Q&As about data sensitivity (ClaudeLog, Reddit, GitHub discussions)
Notes for Daniel: This is a conceptual video that might feel abstract. Keep it grounded with examples. Use visuals when possible (showing a command run, showing a diff). Don't dwell on cloud security paranoia—viewers understand that cloud APIs exist. Focus on the practical benefit: "You get speed and power from both local and cloud."