Skip to content

research skill: add anti-recursion guidance for agents that are the delegate - #72

Closed
warp-agent-staging[bot] wants to merge 1 commit into
mainfrom
factory/research-skill-anti-recursion
Closed

research skill: add anti-recursion guidance for agents that are the delegate#72
warp-agent-staging[bot] wants to merge 1 commit into
mainfrom
factory/research-skill-anti-recursion

Conversation

@warp-agent-staging

Copy link
Copy Markdown
Contributor

Summary

Adds anti-recursion guidance to the research skill. Reference: https://linear.app/warpdotdev/issue/QUALITY-1646/child-agents-re-read-research-and-recursively-spawn-sub-agents-token

The skill's trigger ("would require reading many files... reach for it liberally") reads identically whether the agent reading it is the one asking for research or the one who was asked. A child agent whose own brief was already "investigate X and report back" would re-read /research and fan out to its own sub-subagents on the same question, burning tokens without isolating any new noise (a real incident: a depth-1 factory child alone ran ~61 requests, ~7.8M input tokens, ~$39, plus grandchildren on top).

Companion PR in warpdotdev/warp-server (factory/research-recursion-guardrails) makes the same point from the other side: it makes an agent's remaining orchestration depth budget carry actual weight against this pull, since today those depth facts are present in the prompt but inert. The two are coordinated to say the same thing.

Changes

  • New "If your own assignment is already the investigation" section: before delegating, check whether you are the dispatcher or the delegate. If your own brief is already "look into X and report back", do the reading yourself instead of re-delegating — the one exception is when your own brief genuinely decomposes into independent sub-parts.
  • Reinforcing bullet added to the existing "do NOT delegate" examples list, pointing back at the new section.
  • The skill's real use case (delegating noisy investigation when you are not already the delegate) is unchanged and not neutered.

Verification

This is a documentation/prompt-wording change to a markdown skill file; there is no automated test harness for skill content in this repo. Verified by re-reading the rendered skill end-to-end for internal consistency and confirming it doesn't contradict or duplicate the existing "do NOT delegate" guidance.

…elegate

Companion to a warp-server change restricting/discouraging further
delegation. The skill's trigger ("would require reading many files...
reach for it liberally") reads identically whether the reader is the
one asking for research or the one who was asked, so a subagent
already acting as the investigator would re-read this skill and fan
out to its own sub-subagents on the same question.

Adds a dedicated section telling an agent to check which role it is
in before delegating, plus a reinforcing bullet in the do-NOT-delegate
examples. The skill's real use case (delegating noisy investigation
from a position where you are NOT already the delegate) is unchanged.

QUALITY-1646

Co-Authored-By: Warp Agent <agent@warp.dev>
@warp-agent-staging warp-agent-staging Bot added the factory:wilson Routes this item to the wilson factory label Aug 13, 2026
@warp-agent-staging
warp-agent-staging Bot requested review from harryalbert and szgupta and removed request for szgupta August 13, 2026 23:18
@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review August 14, 2026 13:39
@warp-for-oss

warp-for-oss Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@warp-agent-staging[bot]

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@warp-for-oss warp-for-oss Bot 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.

Overview

This PR adds explicit anti-recursion guidance to the shared research skill, clarifying that agents already assigned to investigate and report should usually perform the reading themselves rather than recursively delegating the same investigation.

Concerns

  • No blocking concerns found. The change is limited to skill documentation/prompt guidance, is consistent with the surrounding delegation guidance, and the attached spec context reports no approved or repository spec to validate against. No repository-local security-review companion skill was present in this checkout; the general security pass found no security-relevant concerns.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

factory:wilson Routes this item to the wilson factory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants