Skip to content

Commit c06dd7f

Browse files
committed
fix: skip system prompt injection for subagent sessions
1 parent 4fe0a5c commit c06dd7f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const plugin: Plugin = (async (ctx) => {
1515

1616
// Suppress AI SDK warnings
1717
if (typeof globalThis !== "undefined") {
18-
;(globalThis as any).AI_SDK_LOG_WARNINGS = false
18+
; (globalThis as any).AI_SDK_LOG_WARNINGS = false
1919
}
2020

2121
const logger = new Logger(config.debug)
@@ -30,6 +30,10 @@ const plugin: Plugin = (async (ctx) => {
3030
_input: unknown,
3131
output: { system: string[] },
3232
) => {
33+
if (state.isSubAgent) {
34+
return
35+
}
36+
3337
const systemText = output.system.join("\n")
3438
const internalAgentSignatures = [
3539
"You are a title generator",

0 commit comments

Comments
 (0)