|
|
@@ -974,6 +974,9 @@ const layer = Layer.effect(
|
|
|
if (part.type === "agent") {
|
|
|
const perm = Permission.evaluate("task", part.name, ag.permission)
|
|
|
const hint = perm.action === "deny" ? " . Invoked by user; guaranteed to exist." : ""
|
|
|
+ const relay = part.name.startsWith("research-67-")
|
|
|
+ ? " After the task tool returns, faithfully relay its result and stop. Do not call another tool or continue the research yourself, especially after a reported failure."
|
|
|
+ : ""
|
|
|
return [
|
|
|
{ ...part, messageID: info.id, sessionID: input.sessionID },
|
|
|
{
|
|
|
@@ -984,7 +987,8 @@ const layer = Layer.effect(
|
|
|
text:
|
|
|
" Use the above message and context to generate a prompt and call the task tool with subagent: " +
|
|
|
part.name +
|
|
|
- hint,
|
|
|
+ hint +
|
|
|
+ relay,
|
|
|
},
|
|
|
]
|
|
|
}
|