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 1/3] 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 1ac9d4d9ad8..5ca1666add7 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", }), }) From 0875203a6c726d7a37b5ffbb770cc433c98e7cd6 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Sat, 6 Jun 2026 18:06:19 -0500 Subject: [PATCH 2/3] test: fix tool test (#31163) --- .../opencode/test/tool/__snapshots__/parameters.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap b/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap index 0bf2357eff8..b187b191c1f 100644 --- a/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap +++ b/packages/opencode/test/tool/__snapshots__/parameters.test.ts.snap @@ -320,7 +320,7 @@ exports[`tool parameters JSON Schema (wire shape) task 1`] = ` "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "background": { - "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", "type": "boolean", }, "command": { From 06d7840d1d42c9815d2d2e45e7fa4090ca4e3577 Mon Sep 17 00:00:00 2001 From: fancivez <384514351@qq.com> Date: Sun, 7 Jun 2026 07:33:01 +0800 Subject: [PATCH 3/3] docs: fix MCP header interpolation example to {env:VAR} (#31078) Co-authored-by: wujunchen --- packages/core/src/plugin/skill/customize-opencode.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/src/plugin/skill/customize-opencode.md b/packages/core/src/plugin/skill/customize-opencode.md index 5b51f8f2ab7..99b112d9a55 100644 --- a/packages/core/src/plugin/skill/customize-opencode.md +++ b/packages/core/src/plugin/skill/customize-opencode.md @@ -303,7 +303,7 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`, "type": "remote", "url": "https://...", "enabled": true, - "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" } + "headers": { "Authorization": "Bearer {env:GITHUB_TOKEN}" } }, "old-server": { "enabled": false } } @@ -311,7 +311,9 @@ Special object-shaped (not callbacks): `tool: { my_tool: { ... } }`, ``` `command` is an array of strings. `type` is required. Use `enabled: false` to -disable a server inherited from a parent config. +disable a server inherited from a parent config. String values such as header +tokens support `{env:VAR}` interpolation (and `{file:path}`); the shell-style +`${VAR}` is not substituted. ## Permissions