Skip to content

fix(core): stop telling models to always use apply_patch - #371

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/prompt-prefer-edit-over-apply-patch
Aug 16, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/prompt-prefer-edit-over-apply-patch

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Removes the Codex leftover that told the model to always use apply_patch. That sentence sat above the File edits section and overrode the preference for edit on a focused change.

File edits is now the only instruction:

  • edit for a focused exact-string replace
  • write_file to create or replace a whole file
  • apply_patch for multi-hunk or multi-file diffs

system_prompt_uses_forge_policy now asserts the leftover sentence is gone and that File edits is still present.

Test plan

  • cargo test --package forge-core --lib system_prompt --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --all-targets --locked
  • CI green on this PR

The Codex leftover sat above File edits and overrode the preference
for edit on a focused change.
@github-actions
github-actions Bot enabled auto-merge (squash) August 16, 2026 19:57
@github-actions
github-actions Bot merged commit f1bca2e into main Aug 16, 2026
7 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
The Codex leftover sat above File edits and overrode the preference
for edit on a focused change.
mohitranka added a commit that referenced this pull request Sep 11, 2026
The Codex leftover sat above File edits and overrode the preference
for edit on a focused change.
mohitranka added a commit that referenced this pull request Sep 11, 2026
The Codex leftover sat above File edits and overrode the preference
for edit on a focused change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant