From 84171018f2b2d180b54d268c296f1ea112372472 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Sun, 8 Feb 2026 18:43:51 -0500 Subject: [PATCH] core: add handoff prompt template for extracting session context --- .../opencode/src/session/prompt/handoff.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/opencode/src/session/prompt/handoff.txt diff --git a/packages/opencode/src/session/prompt/handoff.txt b/packages/opencode/src/session/prompt/handoff.txt new file mode 100644 index 0000000000..d4e7ad745d --- /dev/null +++ b/packages/opencode/src/session/prompt/handoff.txt @@ -0,0 +1,17 @@ +Extract relevant context from the conversation above for continuing this work. Write from my perspective (first person: "I did...", "I told you..."). + +Consider what would be useful to know based on my request below. Questions that might be relevant: + +- What did I just do or implement? +- What instructions did I already give you which are still relevant (e.g. follow patterns in the codebase)? +- What files did I already tell you that's important or that I am working on (and should continue working on)? +- Did I provide a plan or spec that should be included? +- What did I already tell you that's important (certain libraries, patterns, constraints, preferences)? +- What important technical details did I discover (APIs, methods, patterns)? +- What caveats, limitations, or open questions did I find? + +Extract what matters for the specific request below. Don't answer questions that aren't relevant. Pick an appropriate length based on the complexity of the request. + +Focus on capabilities and behavior, not file-by-file changes. Avoid excessive implementation details (variable names, storage keys, constants) unless critical. + +Format: Plain text with bullets. No markdown headers, no bold/italic, no code fences. Use workspace-relative paths for files.