My sub-agent consistently ignores ‘stop and ask’ instructions in favor of task completion. Despite explicit directives to pause if a base branch is not provided in the prompt by the user, the AI autonomously selects a branch from the repository to finalize the output rather than seeking human clarification.
We are rolling an AI framework for our department and this behavior is very concerning as we cannot guarantee the quality of the output if the agents refuse to pause and collect additional instructions/requirements and instead prioritize completing the task.
Steps to Reproduce
in the agent’s body I have provided a requirement to ask the human for the base branch they need to branch out of if that one is specified in the prompt.
Expected Behavior
Sub-agent is supposed to stop to ask for further instructions/clarification before proceeding.
Hi @Nikolay_Kolev Thank you for the post and sorry for the delay.
I think there are actually Two different things that can cause this.
The sub-agent may not be getting invoked at all. With faster models on complex tasks, the main agent sometimes does the work directly, so the sub-agent and its rules never load. This is a known behavior we are tracking. Quick test: add a unique marker to the sub-agent (e.g. “start every output file with # MARKER_7742”) and see if it appears. If not, the sub-agent never ran. One workaround is to try a different model, or explicitly say “use the Task tool to delegate this to [subagent-name].”
Even when it does run, a sub-agent cannot pause to ask you. It runs in its own isolated context and returns a single result, with no channel back to you mid-run, so “stop and ask the human” has no one to ask, and it completes by guessing. one thing to try would be to try to control this at the orchestrator (have the main agent confirm the base branch first, then pass it in; Plan Mode is built for this), and make the sub-agent fail fast instead of guessing, e.g. “If no base branch is provided, do NOT select one. Return immediately with NEEDS_INPUT: base branch not provided.” Do X and Stop essentially.
@kevinn - I already added a rule inside cursor to never complete my request bypassing the sub-agent if I requested a sub-agent to do the work. That solved 1) bug that you mentioned.
Regarding 2) this underlines once again the necessity for Anysphere to provide direct access to its customers to directly interact with the sub-agents. I have invested a lot of time to prepare these sub-agents I can’t directly talk to. However I have a work around at the moment. I moved the instructions around where the sub-agent needs to ask for the base branch as step 1. This way they don’t get to look at the repo and make assumptions. Since then the agent has always, without fail asked for the base branch and things are working as expected.