Watch
1
0
Fork
You've already forked souveraine
0

subagent: send task as user message, not folded into system prompt

This commit is contained in:
Fimeg 2026-08-11 10:48:55 -04:00
commit 517d8c1927

View file

@ -64,8 +64,8 @@ impl SubagentRunner for ServerSubagentRunner {
"You are a threaded fork of agent {}. You share their tools, their \
memory boundaries, their dual-state architecture. After you respond, \
your N+1 pass will surface observations back to them.\n\n\
Your final message will be returned to the caller.\n\n{}",
params.parent_agent_id, params.prompt
Your final message will be returned to the caller.",
params.parent_agent_id
);
// Build tool definitions
@ -93,8 +93,14 @@ impl SubagentRunner for ServerSubagentRunner {
),
);
// Initial messages: system prompt + user prompt
let mut messages = vec![BifrostMessage::text("system", system_prompt)];
// Initial messages: system prompt + user prompt.
// The task must be a *user* message: providers that hoist system
// messages into a separate field are left with an empty messages
// array otherwise, and reject the request.
let mut messages = vec![
BifrostMessage::text("system", system_prompt),
BifrostMessage::text("user", params.prompt.clone()),
];
let mut final_content = String::new();
let mut tool_round = 0u32;