Skip to content

Commit b9131aa

Browse files
authored
fix: background agent prompting, lets kill this sleep behavior oml (anomalyco#31162)
1 parent 4519a1d commit b9131aa

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

packages/opencode/src/tool/task.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ const BACKGROUND_DESCRIPTION = [
3030
].join(" ")
3131
const BACKGROUND_STARTED = [
3232
"The task is working in the background. You will be notified automatically when it finishes.",
33-
"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.",
33+
"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.",
3434
"Work on non-overlapping tasks, or briefly tell the user what you launched and end your response.",
3535
].join("\n")
3636
const BACKGROUND_UPDATED = [
3737
"Additional context sent to the running background task.",
3838
"The task is still working in the background. You will be notified automatically when it finishes.",
39-
"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.",
39+
"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.",
4040
"Work on non-overlapping tasks, or briefly tell the user what you sent and end your response.",
4141
].join("\n")
4242

@@ -56,7 +56,8 @@ const BaseParameters = Schema.Struct(BaseParameterFields)
5656
export const Parameters = Schema.Struct({
5757
...BaseParameterFields,
5858
background: Schema.optional(Schema.Boolean).annotate({
59-
description: "Run the agent in the background. You will be notified when it completes.",
59+
description:
60+
"Run the agent in the background. You will be notified when it completes. DO NOT sleep, poll, or proactively check on its progress",
6061
}),
6162
})
6263

0 commit comments

Comments
 (0)