summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorShantur Rathore <[email protected]>2025-11-30 20:31:57 +0000
committerGitHub <[email protected]>2025-11-30 14:31:57 -0600
commitaaa31f02af5cd1d90e11549ee7b291e2f2a913d2 (patch)
treedc488dd21286d05d6ea297b0ce7bdaf6db97c23f
parentff609a52c13fa0444cb338d35fb16a07a820b539 (diff)
downloadopencode-aaa31f02af5cd1d90e11549ee7b291e2f2a913d2.tar.gz
opencode-aaa31f02af5cd1d90e11549ee7b291e2f2a913d2.zip
tweak: compaction prompt (#4838)
Co-authored-by: Aiden Cline <[email protected]>
-rw-r--r--packages/opencode/src/session/compaction.ts2
-rw-r--r--packages/opencode/src/session/prompt/compaction.txt2
2 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/session/compaction.ts b/packages/opencode/src/session/compaction.ts
index 41571bcef..a6b71edce 100644
--- a/packages/opencode/src/session/compaction.ts
+++ b/packages/opencode/src/session/compaction.ts
@@ -178,7 +178,7 @@ export namespace SessionCompaction {
content: [
{
type: "text",
- text: "Provide a detailed but concise summary of our conversation above. Focus on information that would be helpful for continuing the conversation, including what we did, what we're doing, which files we're working on, and what we're going to do next.",
+ text: "Summarize our conversation above. This summary will be the only context available when the conversation continues, so preserve critical information including: what was accomplished, current work in progress, files involved, next steps, and any key user requests or constraints. Be concise but detailed enough that work can continue seamlessly.",
},
],
},
diff --git a/packages/opencode/src/session/prompt/compaction.txt b/packages/opencode/src/session/prompt/compaction.txt
index 4751c8d71..b919671a0 100644
--- a/packages/opencode/src/session/prompt/compaction.txt
+++ b/packages/opencode/src/session/prompt/compaction.txt
@@ -6,5 +6,7 @@ Focus on information that would be helpful for continuing the conversation, incl
- What is currently being worked on
- Which files are being modified
- What needs to be done next
+- Key user requests, constraints, or preferences that should persist
+- Important technical decisions and why they were made
Your summary should be comprehensive enough to provide context but concise enough to be quickly understood.