diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index c337e94c..a9c287b8 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -17,6 +17,7 @@ ### Fixed +- String `systemPrompt` in `createAgentSession()` now works as a full replacement instead of having context files and skills appended, matching documented behavior ([#543](https://github.com/badlogic/pi-mono/issues/543)) - Update notification for bun binary installs now shows release download URL instead of npm command ([#567](https://github.com/badlogic/pi-mono/pull/567) by [@ferologics](https://github.com/ferologics)) - ESC key now works during "Working..." state after auto-retry ([#568](https://github.com/badlogic/pi-mono/pull/568) by [@tmustier](https://github.com/tmustier)) - Abort messages now show correct retry attempt count (e.g., "Aborted after 2 retry attempts") ([#568](https://github.com/badlogic/pi-mono/pull/568) by [@tmustier](https://github.com/tmustier)) diff --git a/packages/coding-agent/src/core/sdk.ts b/packages/coding-agent/src/core/sdk.ts index 16072359..93bb9ea5 100644 --- a/packages/coding-agent/src/core/sdk.ts +++ b/packages/coding-agent/src/core/sdk.ts @@ -549,14 +549,8 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {} if (options.systemPrompt === undefined) { return defaultPrompt; } else if (typeof options.systemPrompt === "string") { - return buildSystemPromptInternal({ - cwd, - agentDir, - skills, - contextFiles, - selectedTools: validToolNames, - customPrompt: options.systemPrompt, - }); + // String is a full replacement - use as-is without appending context/skills + return options.systemPrompt; } else { return options.systemPrompt(defaultPrompt); }