subagent: send task as user message, not folded into system prompt
This commit is contained in:
parent
e498e72b77
commit
517d8c1927
1 changed files with 10 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue