Subagents ignore user's own API key. Always bill against Cursor plan

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

When a user configures their own Anthropic API key (Cursor Settings > Models > Anthropic API Key), the parent agent correctly routes requests through the user’s key. However, subagents spawned via the Task tool are not routed through the user’s own key — they are billed against the Cursor plan instead.

This causes two distinct failure scenarios depending on the user’s plan state:

Scenario A — Plan usage exhausted (100% consumed): Subagents fail to launch entirely. The parent agent works fine (it uses the user’s own key), but every subagent hits the Cursor plan limit and returns errors like:

“All 4 agents hit a usage limit. It looks like you’ve reached your monthly Cursor usage limit. You’ll need to increase your on-demand spending limit in Cursor settings to continue.”

“Total usage limit reached. Set a new on-demand limit to continue.”

The user explicitly configured their own API key to avoid depending on the Cursor plan quota, yet subagents still draw from it.

Scenario B — Plan usage not exhausted: Subagents launch successfully, but checking the Cursor usage page (detailed breakdown) reveals a billing mismatch:

Parent agent call → billed to User API Key (correct)
Subagent calls (N) → billed to Cursor Plan (incorrect)
The user’s own API key is ignored for all subagent calls. The user is unknowingly consuming Cursor plan quota for subagent work that should be routed through their own key.

Root Cause (Likely)

The subagent spawning code path does not propagate the user’s own API key configuration. It appears to fall back to Cursor’s default API routing regardless of the user’s key settings.

Steps to Reproduce

Scenario A (plan exhausted → subagents blocked) — consistently reproducible now:

Have a Cursor plan at 100% monthly usage (no on-demand spending configured)
Go to Cursor Settings > Models and add your own Anthropic API key
Select an Anthropic model (e.g., Claude Opus 4.6)
Open Agent Mode
Prompt: “Launch 2 sub agents to audit the frontend and backend code”
Result: Parent agent responds (using user’s own key), but all subagents fail with usage limit errors.
Actual Error Messages

All 4 agents hit a usage limit. It looks like you’ve reached your monthly
Cursor usage limit. You’ll need to increase your on-demand spending limit
in Cursor settings to continue.
Total usage limit reached. Set a new on-demand limit to continue.
The subagents hit a usage limit, so I’ll do the exploration directly.
It looks like you’ve hit your monthly usage limit for Cursor — both
sub-agents failed to launch with “Total usage limit reached. Set a new
on-demand limit to continue.”
Scenario B (plan not exhausted → silent billing mismatch) — no longer reproducible on my account since plan is now exhausted due to this bug:

Have a Cursor plan with remaining usage
Go to Cursor Settings > Models and add your own Anthropic API key
Select an Anthropic model (e.g., Claude Opus 4.6)
Open Agent Mode
Prompt: “Explore this codebase and tell me how authentication works” (triggers explore subagent)
Subagents launch and complete successfully
Go to Cursor usage page > detailed usage breakdown
Result: Parent agent call shows “User API Key”; subagent calls show billing against “Cursor Plan”

Expected Behavior

When a user configures their own API key, all agent calls — parent and subagents alike — should route through the user’s own key. Subagents should never fall back to the Cursor plan when a user’s own key is configured. The user’s own key should be propagated to all child processes spawned by the parent agent.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.5.25
VSCode Version: 1.105.1
Commit: 7150844152b426ed50d2b68dd6b33b5c5beb73c0
Date: 2026-02-24T07:17:49.417Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Claude Opus 4.6 (via own Anthropic API key)

For AI issues: add Request ID with privacy disabled

dd3671a8-99b2-422e-b7ca-9ccb90d924f7

Additional Information

This is a blocking issue for power users who bring their own keys specifically to avoid plan limits. Scenario A completely prevents subagent usage. Scenario B silently drains plan quota the user explicitly opted out of by providing their own key.

Does this stop you from using Cursor

No - Cursor works, but with this issue

3 Likes

Hey, thanks for the detailed report. This is a confirmed bug. Sub-agents don’t inherit the user’s API keys and always get billed through the Cursor plan. We’ve seen similar behavior with custom OpenAI base URLs, same pattern: Sub-agents are not using custom OpenAI base URLs.

I’ve passed this to the team and we have the request ID. No timeline yet, but your report helps us prioritize, especially the details about the two scenarios (blocking when the plan runs out, plus silent quota usage).

Let me know if you have any questions.

I would like to just contribute to this message and curious if we have any updated insights on this. It would seem we should be able to use our maximum Ultra mode usage and then switch to a secondary API with Claude or otherwise.

Hi, any news on this? This is a critical issue. For those who depend on external api keys this bug is a blocker.
Thanks