Skip to content

[BUG]: 5/7 model prompts missing 'read before edit' instruction; copilot-gpt-5.txt is dead code #30766

Closed

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

  1. Read source code at packages/opencode/src/session/prompt/ directory
  2. Check each .txt file for presence of "Before editing, always read" instruction
  3. See system.ts to verify which files are imported
  4. Only beast.txt has the instruction; copilot-gpt-5.txt has 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

  1. github-actions commented on Jun 4, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions