Skip to content

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

Merged
snimu merged 1 commit into
mainfrom
chore/remove-delete-child-prompt-line
Sep 1, 2026
Merged

snimu merged 1 commit into
mainfrom
chore/remove-delete-child-prompt-line

Conversation

@snimu

@snimu snimu commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The delegation section of the system prompt instructs the model to "Delete a direct child explicitly with await rlm.delete_subagent(child) when it is no longer needed." Models follow it: finished subagents get deleted routinely, destroying their sessions and any warm context that would make them cheap to reuse for follow-up work. Idle children cost little to keep.

The sentence now reads: "You can delete a direct child explicitly with await rlm.delete_subagent(child). Only do this if and when a user asks for it." The capability stays documented; the default behavior flips from delete-when-done to keep-unless-asked.

Prompt-content tests still pass unchanged (they pin the call form, not the old sentence).

Linear: ENG-5836

Note

Restrict subagent deletion to user-requested only in buildRlmPrompt

Updates the delegation guidance in the RLM system prompt so that explicit deletion of a direct child subagent occurs only when the user asks for it. Previously the prompt directed deletion when the child was no longer needed. Idle children now remain available for follow-ups.

Macroscope summarized 5523618.

@snimu
snimu requested a review from xeophon September 1, 2026 15:42
@snimu
snimu merged commit 3d639f7 into main Sep 1, 2026
34 of 39 checks passed
@snimu
snimu deleted the chore/remove-delete-child-prompt-line branch September 1, 2026 15:54

@sethkarten sethkarten left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not approved. This will lead to substantial subagent build up and kill RAM

snimu pushed a commit that referenced this pull request Sep 1, 2026
* revert(coding-agent): restore subagent cleanup guidance

Reverts #1952 so agents delete direct subagents when they are no longer needed instead of retaining them until a user explicitly requests deletion. Adds prompt coverage for the intended cleanup policy.

* test(coding-agent): keep prompt rollback free of copy assertions
paralin pushed a commit to paralin/prime-agent that referenced this pull request Sep 2, 2026
paralin pushed a commit to paralin/prime-agent that referenced this pull request Sep 2, 2026
…ct-ai#1955)

* revert(coding-agent): restore subagent cleanup guidance

Reverts PrimeIntellect-ai#1952 so agents delete direct subagents when they are no longer needed instead of retaining them until a user explicitly requests deletion. Adds prompt coverage for the intended cleanup policy.

* test(coding-agent): keep prompt rollback free of copy assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants