fix(agents): deny apply_patch for GPT models to prevent verification hangs (#2935)
GPT models (5.3-codex, 5.4, etc.) frequently hang when using apply_patch due to verification loops. This adds: 1. Tool restriction: apply_patch is denied for GPT variants of Hephaestus, Sisyphus-Junior, and Sisyphus agents 2. Prompt guidance: GPT-specific prompts now explicitly instruct using edit/write tools instead of apply_patch 3. Removed the 'Always use apply_patch' instruction from sisyphus-junior/gpt-5-4.ts that contradicted the fix The deny is model-conditional — Claude variants retain apply_patch access since it works reliably there.
This commit is contained in:
@@ -114,6 +114,8 @@ describe("delegation trust prompt rules", () => {
|
||||
expect(prompt).toContain("do only non-overlapping work simultaneously")
|
||||
expect(prompt).toContain("Continue only with non-overlapping work")
|
||||
expect(prompt).toContain("DO NOT perform the same search yourself")
|
||||
expect(prompt).toContain("Do not use `apply_patch`")
|
||||
expect(prompt).toContain("`edit` and `write`")
|
||||
})
|
||||
|
||||
test("Sisyphus-Junior GPT-5.4 prompt forbids duplicate delegated exploration", () => {
|
||||
|
||||
Reference in New Issue
Block a user