summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorAaron Zhu <[email protected]>2026-04-02 10:44:16 +0800
committerGitHub <[email protected]>2026-04-01 21:44:16 -0500
commit5daf2fa7f028f21ba79fd36ec2eb8b0603032673 (patch)
tree906b012842acc74e80faf83a7a1a03107cb220b0 /packages
parent733a3bd031203b9081decae7136d7c9f3ecffdca (diff)
downloadopencode-5daf2fa7f028f21ba79fd36ec2eb8b0603032673.tar.gz
opencode-5daf2fa7f028f21ba79fd36ec2eb8b0603032673.zip
fix(session): compaction agent responds in same language as conversation (#20581)
Co-authored-by: Aaron Zhu <[email protected]>
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/agent/prompt/compaction.txt1
-rw-r--r--packages/opencode/src/session/compaction.ts1
2 files changed, 2 insertions, 0 deletions
diff --git a/packages/opencode/src/agent/prompt/compaction.txt b/packages/opencode/src/agent/prompt/compaction.txt
index 3308627e1..11deccb3a 100644
--- a/packages/opencode/src/agent/prompt/compaction.txt
+++ b/packages/opencode/src/agent/prompt/compaction.txt
@@ -12,3 +12,4 @@ Focus on information that would be helpful for continuing the conversation, incl
Your summary should be comprehensive enough to provide context but concise enough to be quickly understood.
Do not respond to any questions in the conversation, only output the summary.
+Respond in the same language the user used in the conversation.
diff --git a/packages/opencode/src/session/compaction.ts b/packages/opencode/src/session/compaction.ts
index e48b1c7b0..3158393f1 100644
--- a/packages/opencode/src/session/compaction.ts
+++ b/packages/opencode/src/session/compaction.ts
@@ -190,6 +190,7 @@ export namespace SessionCompaction {
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.
The summary that you construct will be used so that another agent can read it and continue the work.
Do not call any tools. Respond only with the summary text.
+Respond in the same language as the user's messages in the conversation.
When constructing the summary, try to stick to this template:
---