diff --git a/src/agents/pi-embedded-runner/run/attempt.ts b/src/agents/pi-embedded-runner/run/attempt.ts index f30dd01fa26..10d4ab675b3 100644 --- a/src/agents/pi-embedded-runner/run/attempt.ts +++ b/src/agents/pi-embedded-runner/run/attempt.ts @@ -1015,7 +1015,7 @@ export async function runEmbeddedAttempt( ); } - // Run llm_input hook — plugins may modify prompt/systemPrompt + // Run llm_input hook — plugins may modify the user prompt if (hookRunner?.hasHooks("llm_input")) { try { const llmInputResult = await hookRunner.runLlmInput( diff --git a/src/plugins/hooks.ts b/src/plugins/hooks.ts index 636929a2ac2..d27199a1c92 100644 --- a/src/plugins/hooks.ts +++ b/src/plugins/hooks.ts @@ -283,7 +283,7 @@ export function createHookRunner(registry: PluginRegistry, options: HookRunnerOp /** * Run llm_input hook. * Allows plugins to observe or modify the input payload sent to the LLM. - * Plugins can return `{ prompt, systemPrompt }` to transform the input, + * Plugins can return `{ prompt }` to transform the input, * or return void/undefined for observation-only (backward compatible). */ async function runLlmInput( @@ -296,7 +296,6 @@ export function createHookRunner(registry: PluginRegistry, options: HookRunnerOp ctx, (acc, next) => ({ prompt: next.prompt ?? acc?.prompt, - systemPrompt: next.systemPrompt ?? acc?.systemPrompt, }), ); } diff --git a/src/plugins/types.ts b/src/plugins/types.ts index 68686753e7a..061f39dabf2 100644 --- a/src/plugins/types.ts +++ b/src/plugins/types.ts @@ -377,8 +377,9 @@ export type PluginHookLlmInputEvent = { export type PluginHookLlmInputResult = { /** Modified prompt text. If set, replaces the original prompt. */ prompt?: string; - /** Modified system prompt. If set, replaces the original system prompt. */ - systemPrompt?: string; + // Note: systemPrompt modification is not yet supported — the system prompt + // is finalised earlier in the pipeline. Will be added when late-stage + // system prompt overrides are plumbed through. }; // llm_output hook