From b9131aa69ce6e1fabce59f7a3ee1ef857d7fc398 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Sat, 6 Jun 2026 17:50:33 -0500 Subject: [PATCH] fix: background agent prompting, lets kill this sleep behavior oml (#31162) --- packages/opencode/src/tool/task.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/tool/task.ts b/packages/opencode/src/tool/task.ts index 1ac9d4d9a..5ca1666ad 100644 --- a/packages/opencode/src/tool/task.ts +++ b/packages/opencode/src/tool/task.ts @@ -30,13 +30,13 @@ const BACKGROUND_DESCRIPTION = [ ].join(" ") const BACKGROUND_STARTED = [ "The task is working in the background. You will be notified automatically when it finishes.", - "Do not poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", + "DO NOT sleep, poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", "Work on non-overlapping tasks, or briefly tell the user what you launched and end your response.", ].join("\n") const BACKGROUND_UPDATED = [ "Additional context sent to the running background task.", "The task is still working in the background. You will be notified automatically when it finishes.", - "Do not poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", + "DO NOT sleep, poll for progress, ask the task for status, or duplicate this task's work — avoid working with the same files or topics it is using.", "Work on non-overlapping tasks, or briefly tell the user what you sent and end your response.", ].join("\n") @@ -56,7 +56,8 @@ const BaseParameters = Schema.Struct(BaseParameterFields) export const Parameters = Schema.Struct({ ...BaseParameterFields, background: Schema.optional(Schema.Boolean).annotate({ - description: "Run the agent in the background. You will be notified when it completes.", + description: + "Run the agent in the background. You will be notified when it completes. DO NOT sleep, poll, or proactively check on its progress", }), })