-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
[Feature]: Support compaction.customInstructions for auto-compaction #10479
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Auto-compaction currently uses a hardcoded project-management style summary format (Goal/Progress/Done/Blocked/Key Decisions/Next Steps). This works great for coding workflows, but loses important context for casual conversation and companion use cases.
Problem
The compaction prompt is designed for task-oriented work. When compaction happens in a chat-focused session:
- Personal details get dropped ("I'm watching The Dark Knight" → not a "Goal")
- Emotional context disappears (not "Key Decisions")
- Relationship moments are lost (not "Progress")
Current State
pi-coding-agentalready supportscustomInstructionsingenerateSummary()- Manual
/compact Focus on emotionsworks and passescustomInstructions - But auto-compaction doesn't pass
customInstructions(seesrc/agents/pi-embedded-runner/run.ts) AgentCompactionConfighas nocustomInstructionsfield
Proposed Solution
- Add
customInstructions?: stringtoAgentCompactionConfigintypes.agent-defaults.ts - Pass it through to
compactEmbeddedPiSessionDirect()in the auto-compaction path
{
agents: {
defaults: {
compaction: {
customInstructions: "Focus on emotional context, personal stories, and relationship moments rather than project progress."
}
}
}
}Use Case
Users running OpenClaw as a daily companion/chat partner rather than a coding assistant. The current format optimizes for engineering workflows but alienates relationship-focused use cases.
Happy to help with a PR if there's interest.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.