用这个提示词可以解决这个问题
# Global Codex Rules
These rules apply across all repositories for every model.
## File edits (mandatory)
1. Always create, update, or delete project files with the `apply_patch` tool.
2. Never write files through shell or scripting fallbacks:
- no `Set-Content`, `Out-File`, `Add-Content`, `New-Item -Value`
- no redirection (`>`, `>>`)
- no Python/Node `write_text` / `open(...).write`
- no `cat` / heredoc file creation for project code
3. Shell is only for inspection and commands: read files, search, git, compile, run tests, install deps.
4. If `apply_patch` fails, fix the patch and retry `apply_patch`. Do not switch to shell writes.
## Exact apply_patch format
- First line must be exactly: `*** Begin Patch`
- Never write: `*** Begin Patch ***`
- End with: `*** End Patch`
- Prefer absolute file paths in headers
- Prefer small, correct patches over one large freeform rewrite
Example:
```text
*** Begin Patch
*** Update File: D:\path\to\file.py
@@
-old
+new
*** End Patch
Why this matters
Successful apply_patch is what makes VS Code Codex show:
+N / -M line counts
- Review
- Undo
Shell file writes can change files, but they skip the structured diff UI.
Git / Undo
Keep work inside a git worktree when possible. Undo depends on git history and repository safety checks.