Orchestrator agent pollutes and overrides prompt context passed to sub-agents

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When invoking a sub-agent (e.g., using /dev-backend), the main orchestrator agent heavily modifies the user’s prompt. It injects massive, unnecessary, and often stale/incorrect repository context before passing the message downstream.

Because the sub-agent already has the correct active context and instructions, this prompt “hijacking” by the main agent confuses the sub-agent and causes it to fail or ignore its original instructions.

Steps to Reproduce

IMPORTANT: The sub-agent has all instructions needed. It knows how our team expects the Pull Requests descriptions to be formatted.


My prompt: “/dev-backend that looks great, now let’s open PRs for all of these changes”

Main Agent’s prompt to the sub-agent:
Open pull requests for all PROJ-1234 data migration changes across the affected repos. Follow the user’s PR creation workflow precisely.

Context - PROJ-1234 Data Migration

Work moved core-specific query logic from legacy-module/content into primary-app-core:

primary-app-core (/Users/username/Projects/primary-app-core)

Branch likely: feature/PROJ-1234-data-migration
New/changed:

  • CustomNotificationSelector.cls, CustomNotificationSelectorTest.cls
  • CustomLogService.cls, CustomLogServiceTest.cls
  • AppRegistration.cls - registers CustomNotificationSelector
    … [Truncated for brevity, but full git diffs and stale task lists were injected here] …

Your tasks

For EACH repo with uncommitted/unpushed changes:

  1. Run in parallel: git status, git diff…
  2. Determine base branch…

Summary
<1-3 bullet points>

Test plan
[Checklist]

Important

  • NEVER update git config
  • Do NOT include secrets, yarn cache churn, or unrelated files
  • Return ALL PR URLs when done
  • If a repo has no changes to commit, say so and skip
  • User explicitly asked to open PRs - commits and pushes are authorized
    Work autonomously through all three repos.

Expected Behavior

The main agent should cleanly pass the user’s direct instruction (“that looks great, now let’s open PRs for all of these changes”) to the sub-agent, or provide a minimal, accurate bridge. It should trust the sub-agent’s existing context rather than force-feeding it a massive, synthesized summary of the workspace state.

Operating System

MacOS

Version Information

Version: 3.5.17
VSCode Version: 1.105.1
Commit: d5b2fc092e16007956c9e5047f76097b9e626ca0
Date: 2026-05-20T02:43:31.559Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.5.0

For AI issues: which model did you use?

Composer 2.5 Max

Additional Information

The inability to establish direct, unpolluted communication with sub-agents makes the multi-agent workflow in Cursor highly unreliable for complex, multi-repo tasks. This is a critical friction point that is actively forcing our team to move away from Cursor features in favor of tools with cleaner context control, like Claude.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey @Nikolay_Kolev!

Thanks for the report. The Task tool system prompt explicitly instructs the parent agent to “provide a highly detailed task description with all necessary context” because “the subagent invocation does not have access to the user’s message or prior assistant steps.” The model is following its instructions by synthesizing conversation context into the subagent prompt.

I wonder if this is a prompting problem or a model problem. Early reports show that Composer 2.5 can sometimes ignore direct asks. This is behavior we’re working to improve!

Does the problem persist with other models used as the subagent model?

@Colin I understand. The core challenge for our team is that Anysphere’s forced ‘middle-man’ agent prevents us from fully leveraging our own robust sub-agent framework. Our sub-agents are already completely configured - including RAG pipelines for handling PR styling, formatting, and documentation. Because our setup is entirely self-sufficient, the intermediary agent is redundant and creates an unnecessary bottleneck for our workflow.