积木 AI
返回常见问题
常见问题详情

常见问题22 Error writing file

2026/06/0463 次阅读

Error writing file

常见问题

原因:cc内部工具问题

解决:在对话框输入以下prompt:

## CRITICAL: File Editing on Windows

### ⚠ MANDATORY: Always Use Backslashes on Windows for File Paths

**When using Edit or MultiEdit tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).**

#### ❌ WRONG - Will cause errors:
```
Edit(file_path: "D:/repos/project/file.tsx", ...)
MultiEdit(file_path: "D:/repos/project/file.tsx", ...)
```

#### ✅ CORRECT - Always works:
```
Edit(file_path: "D:\repos\project\file.tsx", ...)
MultiEdit(file_path: "D:\repos\project\file.tsx", ...)
```

参考链接:https://github.com/anthropics/claude-code/issues/7443