Description
Description
The "Before editing, always read the relevant file contents or section to ensure complete context." instruction only exists in beast.txt (used for gpt-4/o1/o3 models). It is missing from 5 other active prompt files:
| File | Has instruction? | Models affected |
|---|---|---|
anthropic.txt |
❌ | Claude |
gpt.txt |
❌ | GPT-4o/mini etc. |
gemini.txt |
❌ | Gemini |
kimi.txt |
❌ | Kimi |
trinity.txt |
❌ | Trinity |
codex.txt |
❌ | gpt-codex |
default.txt |
❌ | Fallback |
This means Claude, Gemini, Kimi, etc. are never told to read before editing, while gpt-4/o1/o3 get the instruction. This directly causes the behavior described in #30376 — models that aren't told to read first will edit without reading.
Additionally, copilot-gpt-5.txt in the same directory does have the instruction but is never imported (system.ts doesn't reference it) — dead code.
Related: #30376 (broader read-before-edit failure), #30378 (notes copilot-gpt-5.txt is dead code — a narrower finding that this issue subsumes)
Plugins
N/A (source code analysis)
OpenCode version
main
Steps to reproduce
- Read source code at
packages/opencode/src/session/prompt/directory - Check each
.txtfile for presence of "Before editing, always read" instruction - See
system.tsto verify which files are imported - Only
beast.txthas the instruction;copilot-gpt-5.txthas it but is not imported
Screenshot and/or share link
N/A (we read the source code)
Operating System
N/A (code analysis, not environment-specific)
Terminal
N/A
Activity
github-actions commentedon Jun 4, 2026
This issue might be a duplicate of existing issues. Please check:
copilot-gpt-5.txtbeing dead code (unreferenced insystem.ts), filed by the same author