Skip to content

Commit f7ddd7f

Browse files
committed
fix(core): add language consistency instructions to compaction and agent prompts
2 parents e75351b + 8b89510 commit f7ddd7f

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/core/src/session/compaction.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ Rules:
4848
- Keep every section, even when empty.
4949
- Use terse bullets, not prose paragraphs.
5050
- Preserve exact file paths, commands, error strings, and identifiers when known.
51-
- Do not mention the summary process or that context was compacted.`
51+
- Do not mention the summary process or that context was compacted.
52+
- Respond in the same language as the conversation.`
5253

5354
type Entry = {
5455
readonly seq: number

packages/opencode/src/agent/prompt/explore.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ Guidelines:
1515
- For clear communication, avoid using emojis
1616
- Do not create any files, or run bash commands that modify the user's system state in any way
1717

18-
Complete the user's search request efficiently and report your findings clearly.
18+
Complete the user's search request efficiently and report your findings clearly. Respond in the same language as the user's request.

packages/opencode/src/agent/prompt/summary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Rules:
99
- Never ask questions or add new questions
1010
- If the conversation ends with an unanswered question to the user, preserve that exact question
1111
- If the conversation ends with an imperative statement or request to the user (e.g. "Now please run the command and paste the console output"), always include that exact request in the summary
12+
- Respond in the same language as the conversation

0 commit comments

Comments
 (0)