Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/utils/clean-context-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,9 @@ export class CleanContextRunner {

// Phase 2: Embedded agent run (LLM call + tool calls)
const agentStartMs = Date.now();
// extraSystemPrompt: fallback for openclaw < 2026.4.7 which does not support
// config.agents.defaults.systemPromptOverride. On newer versions the
// override takes precedence and this becomes a no-op append.
const effectiveSystemPrompt =
params.systemPrompt ||
"You are a precise data extraction and generation assistant. Follow the user instructions exactly. Respond only with the requested output format.";
// System prompt is fully handled via config.agents.defaults.systemPromptOverride.
// Do NOT pass extraSystemPrompt — it would cause the same prompt to appear
// twice in the final system message (once from override, once appended).
const result = await runEmbeddedPiAgent({
sessionId,
sessionFile,
Expand All @@ -460,7 +457,6 @@ export class CleanContextRunner {
// Instead rely on cleanConfig.tools.allow to restrict the tool set
// to a minimal read-only tool (when enableTools=false).
disableTools: false,
extraSystemPrompt: effectiveSystemPrompt,
streamParams: {
maxTokens: params.maxTokens,
},
Expand Down
Loading