Skip to content

fix: compaction agent responds in English regardless of conversation language #20156

@bsk-iT

Description

@bsk-iT

Description

When compaction triggers, the conversation summary comes out in English and after that, the agent keeps going in English even if everything before was in another language.

I noticed this while working in Portuguese. The session was going fine until context overflow hit. The compaction ran, produced the summary in English (hardcoded headings: ## Goal, ## Instructions, ## Discoveries...), and from that point on the agent treated English as the working language.

The title agent already handles this correctly it has you MUST use the same language as the user message you are summarizing in its prompt. The compaction agent doesn't have anything equivalent.

The fix would be small: add Respond in the same language as the conversation you are summarizing. to compaction.txt and to the inline template in compaction.ts. Same thing in summary.txt.

Plugins

No response

OpenCode version

1.3.7

Steps to reproduce

  1. Start a session in any non-English language
  2. Work on a long enough task to trigger context compaction
  3. Check the language the agent uses after compaction resumes

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Alacritty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)windows

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions