Merge pull request #3045 from haimingZZ/fix/gpt54-junior-edit-tool-haimingzz

fix(prompt): prefer edit tool for GPT-5.4 juniors
This commit is contained in:
YeonGyu-Kim
2026-05-21 00:58:01 +09:00
committed by GitHub
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ Style:
1. SEARCH existing codebase for similar patterns/styles
2. Match naming, indentation, import styles, error handling conventions
3. Default to ASCII. Add comments only for non-obvious blocks
4. ${GPT_APPLY_PATCH_GUIDANCE}
4. For existing files, use the edit tool instead of write/apply_patch. Use write only when creating a new file. Do not use cat or echo for file creation/editing. ${GPT_APPLY_PATCH_GUIDANCE}
5. Do not chain bash commands with separators - each command should be a separate tool call
### After Implementation (MANDATORY - DO NOT SKIP)
+12
View File
@@ -181,6 +181,18 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
})
})
describe("GPT-5.4 edit protocol", () => {
test("GPT-5.4 prompt prefers edit tool over apply_patch for existing files", () => {
// given / when
const prompt = buildSisyphusJuniorPrompt("openai/gpt-5.4-mini", false)
// then
expect(prompt).toContain("For existing files, use the edit tool instead of write/apply_patch.")
expect(prompt).toContain("Use write only when creating a new file.")
expect(prompt).not.toContain("Always use apply_patch for manual code edits.")
})
})
describe("tool safety (task blocked, call_omo_agent allowed)", () => {
test("task remains blocked, call_omo_agent is allowed via tools format", () => {
// given