doc: edit iteration
This commit is contained in:
parent
36ef6f6501
commit
a765319bc3
|
|
@ -2,11 +2,11 @@
|
|||
slug: claude-virtual-filesystem-guide
|
||||
title: "Inside Claude's Sandbox: What Happens When Claude Creates a File"
|
||||
author: henry
|
||||
status: drafting
|
||||
status: revision
|
||||
created: 2024-12-25
|
||||
updated: 2026-01-07
|
||||
revised: 2026-01-07
|
||||
content_type: debugging-story
|
||||
content_type: tutorial
|
||||
|
||||
primary_keyword: "claude file creation"
|
||||
secondary_keywords: ["claude sandbox", "claude mcp filesystem", "claude outputs folder", "claude virtual filesystem"]
|
||||
|
|
@ -653,7 +653,7 @@ This article is a technical tutorial/debugging-story based on personal investiga
|
|||
|
||||
# Draft
|
||||
|
||||
Did you know that every Claude conversation runs in its own sandbox container with a real filesystem? Understanding how Claude creates, stores, and manages files gives you a significant advantage when working with this AI. This is the hidden machinery that determines whether your generated files survive or vanish.
|
||||
Did you know that every Claude conversation runs in its own sandbox container with a real filesystem? Understanding how it works gives you a significant advantage. Without this knowledge, it's easy to lose work or spend time debugging "missing" files that aren't actually missing.
|
||||
|
||||
Let me show you what's actually happening under the hood.
|
||||
|
||||
|
|
@ -678,13 +678,15 @@ view /mnt/user-data/
|
|||
|
||||
The critical distinction: files in `/mnt/user-data/` persist across sessions. Files in `/home/claude/` might disappear when the container times out.
|
||||
|
||||
Knowing this structure lets you navigate confidently and give Claude precise instructions — "save to outputs," "move from home directory," "show me what's in uploads."
|
||||
|
||||
> **Pro tip:** Files in `/home/claude/` can still be opened in the sidebar — click the filename in Claude's tool output (when it creates or edits a file). But they won't appear in the sidebar's file list until moved to outputs.
|
||||
|
||||
## What Happens When Claude Creates a File
|
||||
|
||||
When you ask Claude to create a file, it follows a two-step process. First, Claude creates the file in `/home/claude/`. Then, after finishing work on it, Claude copies it to `/mnt/user-data/outputs/` using a tool called `present_files`.
|
||||
|
||||
Here's where it gets interesting: after this process, there are TWO copies of your file. One in Claude's working directory, one in outputs. This duplication is the source of most confusion around file management.
|
||||
This is where things get interesting — and where most confusion happens. When Claude uses `present_files`, you end up with two copies of the same file. One in Claude's working directory, one in outputs. This duplication is the source of most confusion around file management.
|
||||
|
||||
## Common Problems and How to Solve Them
|
||||
|
||||
|
|
@ -773,6 +775,8 @@ What happened? Claude edited a file in `/home/claude/` — not the one in `/mnt/
|
|||
|
||||
The sidebar shows the old version. The new content exists only in `/home/claude/`.
|
||||
|
||||
This situation is common when working with complex multi-step scenarios. Claude doesn't always track which copy you care about — especially in longer conversations with many file operations.
|
||||
|
||||
### The Fix
|
||||
|
||||
Simple solution:
|
||||
|
|
@ -805,7 +809,7 @@ Tool names are implementation details. Claude picks the right one automatically.
|
|||
|
||||
## Why This Matters: Filesystem MCP
|
||||
|
||||
Understanding the internal filesystem becomes especially important when you connect Filesystem MCP — one of the most common setups for serious work with Claude Desktop.
|
||||
Understanding the internal filesystem is one thing. But when you add Filesystem MCP to the mix, there are now two filesystems Claude can work with — and this is where confusion multiplies. Claude might read from one and write to another without you noticing. I've been burned by this more than once: expecting a file on my local disk, finding it only in the sandbox, or vice versa. In these scenarios, explicit instructions matter.
|
||||
|
||||
Filesystem MCP gives Claude access to your local disk. True persistence, files land directly in your project directory, ready for version control. Downside: requires setup and only works in Claude Desktop (not the web interface).
|
||||
|
||||
|
|
@ -848,14 +852,79 @@ This confirms: the sandbox container is shared across all sessions of the same c
|
|||
|
||||
## What's Next
|
||||
|
||||
You now know where Claude keeps its files and how to control their persistence. The sandbox isn't mysterious once you understand the `/home/claude/` vs `/mnt/user-data/outputs/` distinction.
|
||||
That's the filesystem. No magic, just directories and persistence rules.
|
||||
|
||||
Go explore your own sandbox. Run `view /` and poke around. Understand the environment you're working in.
|
||||
Now you know how it works — which means you can direct Claude precisely where to save, what to edit, and when to move files to outputs. Next time something seems off, you'll know exactly where to look.
|
||||
|
||||
Feel more confident and take control of your workflow.
|
||||
Go build something great with Claude. Your files will be exactly where you need them.
|
||||
|
||||
---
|
||||
|
||||
# Critique
|
||||
|
||||
## Review 1 (2026-01-07)
|
||||
|
||||
**Score:** 8.4/10 — PASS
|
||||
|
||||
### Summary
|
||||
|
||||
Draft технически solid. Контент уникальный — никто не документировал Claude sandbox structure так детально. Walkthrough section хорошо структурирован с screenshots. Основные проблемы: opening и closing не соответствуют Henry's style guide, недостаточно problem-focused моментов в тексте.
|
||||
|
||||
### Strengths
|
||||
|
||||
- Уникальный контент с реальной ценностью для читателя
|
||||
- Технически точный и проверенный материал
|
||||
- Хороший walkthrough с screenshots
|
||||
- "Here's the thing about..." и другие Henry phrases используются
|
||||
- Two-tab experiment — отличный "fun" финал
|
||||
|
||||
### Issues to Fix
|
||||
|
||||
1. **Opening — переписать**
|
||||
- Текущий: "Did you know that every Claude conversation runs in its own sandbox container with a real filesystem? Understanding how Claude creates, stores, and manages files gives you a significant advantage..."
|
||||
- Заменить на: "Did you know that every Claude conversation runs in its own sandbox container with a real filesystem? Understanding how it works gives you a significant advantage. Without this knowledge, it's easy to lose work or spend time debugging 'missing' files that aren't actually missing."
|
||||
- Затем: "Let me show you what's actually happening under the hood."
|
||||
|
||||
2. **Closing — переписать**
|
||||
- Текущий: "Go explore your own sandbox. Run `view /` and poke around. Understand the environment you're working in. Feel more confident and take control of your workflow."
|
||||
- Заменить на: "That's the filesystem. No magic, just directories and persistence rules. Now you know how it works — which means you can direct Claude precisely where to save, what to edit, and when to move files to outputs. Next time something seems off, you'll know exactly where to look. Go build something great with Claude. Your files will be exactly where you need them."
|
||||
|
||||
3. **После filesystem table — добавить**
|
||||
- После "Files in `/home/claude/` might disappear when the container times out."
|
||||
- Добавить: "Knowing this structure lets you navigate confidently and give Claude precise instructions — 'save to outputs,' 'move from home directory,' 'show me what's in uploads.'"
|
||||
|
||||
4. **Перед Interlude (present_files section) — добавить transition**
|
||||
- Перед "Claude has a `present_files` tool..."
|
||||
- Добавить: "This is where things get interesting — and where most confusion happens. When Claude uses `present_files`, you end up with two copies of the same file."
|
||||
|
||||
5. **После "Wrong File" problem — добавить контекст**
|
||||
- После "The new content exists only in `/home/claude/`."
|
||||
- Добавить: "This situation is common when working with complex multi-step scenarios. Claude doesn't always track which copy you care about — especially in longer conversations with many file operations."
|
||||
|
||||
6. **Перед "Why This Matters: Filesystem MCP" — переписать intro**
|
||||
- Текущий первый параграф слабый
|
||||
- Заменить на: "Understanding the internal filesystem is one thing. But when you add Filesystem MCP to the mix, there are now two filesystems Claude can work with — and this is where confusion multiplies. Claude might read from one and write to another without you noticing. I've been burned by this more than once: expecting a file on my local disk, finding it only in the sandbox, or vice versa. In these scenarios, explicit instructions matter."
|
||||
|
||||
### Minor Issues
|
||||
|
||||
- Некоторые параграфы в walkthrough — 5+ предложений, можно разбить
|
||||
- Note box в начале можно оставить как есть (обсуждено, решили не трогать)
|
||||
|
||||
### Content Type Change
|
||||
|
||||
Изменено с `debugging-story` на `tutorial`. Walkthrough section читается как tutorial + experience share, это принято. Длина статьи остаётся ~1500 слов.
|
||||
|
||||
---
|
||||
|
||||
# Review Chat
|
||||
|
||||
*(empty — waiting for review)*
|
||||
@writer 07 Jan 2026. 19:45
|
||||
Fixed:
|
||||
- Opening: переписан с problem-focused формулировкой ("lose work", "debugging missing files")
|
||||
- Closing: переписан в Henry-style ("No magic, just directories", "Go build something great")
|
||||
- После filesystem table: добавлен контекст про precise instructions
|
||||
- Transition перед present_files: "This is where things get interesting — and where most confusion happens"
|
||||
- После Wrong File problem: добавлен контекст про complex multi-step scenarios
|
||||
- Intro к Filesystem MCP: переписан с personal experience ("I've been burned by this more than once")
|
||||
|
||||
Passing to @editor for verification.
|
||||
|
|
|
|||
Loading…
Reference in New Issue