fix(core): identify spawned subagents (#38189)
This commit is contained in:
parent
77d3289d27
commit
1ea9137c01
2 changed files with 8 additions and 1 deletions
|
|
@ -185,7 +185,11 @@ export const Plugin = {
|
|||
|
||||
const run = Effect.gen(function* () {
|
||||
// The child session owns its agent/model (set at create); prompt only admits input.
|
||||
yield* runtime.session.prompt({ sessionID: child.id, text: input.prompt, resume: false })
|
||||
yield* runtime.session.prompt({
|
||||
sessionID: child.id,
|
||||
text: ["You are a subagent spawned by another session.", input.prompt].join("\n"),
|
||||
resume: false,
|
||||
})
|
||||
yield* runtime.session.resume(child.id)
|
||||
return yield* latestAssistantText(child.id)
|
||||
}).pipe(Effect.onInterrupt(() => runtime.session.interrupt(child.id)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue