Skip to content

SUMMARIZATION_SYSTEM_PROMPT in compaction.ts hardcodes "AI coding assistant" #5401

@maotoumao

Description

@maotoumao

What do you want to change?

SUMMARIZATION_SYSTEM_PROMPT in packages/agent/src/harness/compaction/compaction.ts (L379) reads:

"...Your task is to read a conversation between a user and an AI coding assistant..."

There is no way to override it. Two options would fix this:

  • Replace "AI coding assistant" with a neutral "an AI assistant"
  • Accept an optional summarizationSystemPrompt parameter in generateSummary that falls back to the built-in default

Why?

I'm building a general-purpose browser sidebar agent (cebian) on top of @earendil-works/pi and want to reuse the compaction mechanism. The current prompt produces suboptimal summaries for non-coding contexts, and there's no override path.

The agent package is core infrastructure. "AI coding assistant" is an application-layer concern that shouldn't be baked into the summarization path.

How? (optional)

I'd lean toward the simpler fix: replacing "AI coding assistant" with "an AI assistant" in the existing constant — a one-line change with no API surface impact.

That said, if an optional customSystemPrompt parameter is preferred for flexibility, I'm happy to go that route instead.

If this is acceptable, I can open a small PR after lgtm.

Metadata

Metadata

Assignees

Labels

inprogressIssue is being worked on

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