Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

fix(coding-agent): make subagent deletion user-requested in the system prompt (#1952)

Sebastian Müller3d639f7ba1d5
diff --git a/packages/coding-agent/.changes/prompt-subagent-deletion-user-only.md b/packages/coding-agent/.changes/prompt-subagent-deletion-user-only.md
new file mode 100644
index 0000000000..9f8a72c615
--- /dev/null
+++ b/packages/coding-agent/.changes/prompt-subagent-deletion-user-only.md
@@ -0,0 +1 @@
+- The system prompt no longer tells the model to delete finished subagents by default; deletion is now described as user-requested only, so idle children stay available for follow-ups.
diff --git a/packages/coding-agent/src/core/prompts/rlm.ts b/packages/coding-agent/src/core/prompts/rlm.ts
index ef610268e6..64f17830dc 100644
--- a/packages/coding-agent/src/core/prompts/rlm.ts
+++ b/packages/coding-agent/src/core/prompts/rlm.ts
@@ -169,7 +169,7 @@ export function buildRlmPrompt(options: RlmPromptOptions): string {
parts.push("Inspect files a child wrote when you need to collect its work without an observation capability.");
}
parts.push(
- "Spawn independent children in separate calls and end your turn instead of awaiting completion. Multiple replies may arrive over multiple turns. Delete a direct child explicitly with `await rlm.delete_subagent(child)` when it is no longer needed.",
+ "Spawn independent children in separate calls and end your turn instead of awaiting completion. Multiple replies may arrive over multiple turns. You can delete a direct child explicitly with `await rlm.delete_subagent(child)`. Only do this if and when a user asks for it.",
);
}