File Handling Rules for Claude's Computer Use Mode: Uploads, Outputs, and Working Directory
Claude's computer use mode enforces a strict three-zone filesystem separating user uploads at /mnt/user-data/uploads, temporary workspace at /home/claude, and final deliverables at /mnt/user-data/outputs to ensure safe data isolation and reliable artifact delivery.
The asgeirtj/system_prompts_leaks repository reveals the internal system prompts that govern how Claude manages files in computer-use environments. These file handling rules define exactly where Claude can read user data, perform intermediate processing, and store final outputs that users can access.
The Three-Zone Filesystem Architecture
Claude's computer use mode operates within a sandboxed environment with three distinct filesystem zones. According to the system prompts in Anthropic/old/claude-opus-4.5.md, these zones prevent data leakage between user uploads, internal processing state, and final deliverables.
User Uploads Zone (/mnt/user-data/uploads)
This directory contains files the user attaches to the chat, including images, text files, CSVs, and documents. Claude interacts with these files using the view /mnt/user-data/uploads tool to list available uploads. For files whose content already appears in the context window, such as plain-text markdown pasted into the chat, Claude can reference the in-chat content directly without invoking the computer tool.
Claude's Working Directory (/home/claude)
This scratch space serves as Claude's temporary workspace for intermediate processing, iterative editing, and running analysis scripts. Claude creates, edits, and executes files here during active work sessions. Critical restriction: Claude must never write final user-visible files directly to /home/claude because users cannot access this internal directory.
Final Outputs Zone (/mnt/user-data/outputs)
This directory stores files that users expect to download or view, including reports, code artifacts, PDFs, and processed data. After completing work in /home/claude, Claude copies or moves the final file to /mnt/user-data/outputs. Claude then provides a computer:// link, such as [View report](computer:///mnt/user-data/outputs/report.docx), allowing users to open the file directly. For small files under 100 lines, Claude may write directly to the outputs directory without intermediate steps.
Step-by-Step File Handling Workflow
The system prompts in Anthropic/claude-cowork.md outline a specific workflow for moving files between zones:
- Discover uploads – Run
view /mnt/user-data/uploadsto list available user files. - Copy to working area – Execute
cp /mnt/user-data/uploads/<filename> /home/claude/to bring files into the workspace, or read directly if content exists in the chat context. - Process and edit – Perform analysis, transformation, or iterative editing inside
/home/claude. - Publish results – For files ≤ 100 lines, write directly to
/mnt/user-data/outputs. For larger files, copy the final version from/home/claudeto/mnt/user-data/outputs. - Share with user – Provide a clickable
computer://link pointing to the output location.
Practical Code Examples
Processing Uploaded CSV Files
When a user uploads a CSV for analysis, Claude must first check the uploads directory, copy the file to the working directory, process it, and move the results to outputs:
# List uploaded files
view /mnt/user-data/uploads
# Copy CSV to working directory
cp /mnt/user-data/uploads/sales_data.csv /home/claude/
# Create and run processing script
cat <<'PY' > /home/claude/compute_totals.py
import pandas as pd
df = pd.read_csv('sales_data.csv')
print(f"Total sales: ${df['amount'].sum():,.2f}")
PY
python3 /home/claude/compute_totals.py > /home/claude/totals.txt
# Move result to outputs
cp /home/claude/totals.txt /mnt/user-data/outputs/
Claude then shares the result with:
[View totals](computer:///mnt/user-data/outputs/totals.txt)
Creating Short Reports Directly in Outputs
For small files under 100 lines, Claude can bypass the working directory and write directly to outputs:
cat <<'MD' > /mnt/user-data/outputs/quick_report.md
# Quarterly Sales Summary
Total sales: $1,254,320
Top product: SuperWidget
Growth: +15% QoQ
MD
Iterative Editing of Large Documents
For documents exceeding 100 lines, Claude must use the working directory for iterative drafts before finalizing:
# Create initial outline in working directory
cat <<'TEX' > /home/claude/report.tex
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\title{Annual Analysis}
\author{Claude}
\date{\today}
\maketitle
% Content sections to be added iteratively
\end{document}
TEX
# Subsequent iterations edit the file in place
# ... multiple edit cycles ...
# Final step: move to outputs
cp /home/claude/report.tex /mnt/user-data/outputs/
Source Code References
The file handling rules are defined in the following system prompt files within the asgeirtj/system_prompts_leaks repository:
| File | Description | Location |
|---|---|---|
Anthropic/old/claude-opus-4.5.md |
Contains the file_handling_rules block defining the three-zone architecture and interaction patterns. | View source |
Anthropic/old/claude-4.5-sonnet.md |
Mirrors the same file handling rules for the Sonnet-4.5 variant. | View source |
Anthropic/claude-opus-4.6.md |
Updated wording for the view tool usage and reinforced copy-to-working-directory guidance. |
View source |
Anthropic/claude-cowork.md |
Practical examples of moving files between /mnt/user-data/uploads, /home/claude, and /mnt/user-data/outputs. |
View source |
Summary
- Three-zone architecture: Claude's computer use mode strictly separates user uploads (
/mnt/user-data/uploads), temporary working space (/home/claude), and final outputs (/mnt/user-data/outputs). - Working directory isolation: Never write final user-visible files to
/home/claude—users cannot access this internal scratch space. - Output delivery: Copy completed files from
/home/claudeto/mnt/user-data/outputsand share viacomputer://links for user access. - Small file exception: Files under 100 lines may be written directly to
/mnt/user-data/outputswithout intermediate storage in the working directory. - Upload access: Use
view /mnt/user-data/uploadsto discover user-uploaded files, then copy to/home/claudefor processing.
Frequently Asked Questions
Can Claude write files directly to the user uploads directory?
No, Claude cannot write to /mnt/user-data/uploads. This directory is read-only and reserved exclusively for files the user attaches to the chat. Claude can only view and copy files from this location into the working directory for processing.
What happens if Claude writes final outputs to the working directory instead of the outputs folder?
If Claude writes final deliverables to /home/claude instead of /mnt/user-data/outputs, users will be unable to access or download those files. The working directory is isolated from user access, making it suitable only for temporary processing and intermediate drafts.
Is there a size limit for files in the outputs directory?
While there is no explicit size limit defined in the system prompts, files under 100 lines may be written directly to /mnt/user-data/outputs without first storing them in the working directory. Larger files should follow the standard workflow: create and iterate in /home/claude, then copy the final version to outputs.
How does Claude handle files already present in the context window?
For files whose content already appears in the chat context, such as plain-text markdown pasted directly into the conversation, Claude can reference the in-chat content directly without invoking the computer to open the file. However, for binary files or content not fully present in context, Claude must use the view tool to access /mnt/user-data/uploads.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →