From f46b7335850576707a67c50757a705102550f37e Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Tue, 24 Feb 2026 13:30:32 +0100 Subject: [PATCH] fix: add system prompt instruction about block The model didn't know to look for or use the block injected into user messages. Add a static instruction in the system prompt explaining it, similar to how the legacy VS Code extension does it. This instruction is static text that never changes, so it caches well alongside the rest of the system prompt. --- packages/opencode/src/session/system.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/opencode/src/session/system.ts b/packages/opencode/src/session/system.ts index 348fd881062..e3faf0a7749 100644 --- a/packages/opencode/src/session/system.ts +++ b/packages/opencode/src/session/system.ts @@ -79,6 +79,10 @@ export namespace SystemPrompt { : "" }`, ``, + // kilocode_change start + ``, + `At the end of each user message, you may receive with information about the user's currently active file, visible editors, and open tabs. This is auto-generated context — use it to understand which files the user is working with.`, + // kilocode_change end ].join("\n"), ] }