ysskrishna logoysskrishna
Cover image for Cursor Subagents Ignoring Their Model? Run Them Through Claude Code

Cursor Subagents Ignoring Their Model? Run Them Through Claude Code

ysskrishna profile photoysskrishna
3 min read
Agent Skills
Chat & AI

You wrote a scout agent for the boring part of the job: read the repo, list the files that matter, hand back a summary. You put model: haiku in its frontmatter because a scout does not need your most expensive model.

Then you spawned it from Cursor and watched the usage meter climb like the parent chat was doing the work. Because it was.

That is not a prompt problem. It is routing.

Why your subagent ran on the wrong model

Cursor reads custom subagents from .cursor/agents/*.md, .claude/agents/*.md and .codex/agents/*.md. Each file can declare a model:. But Cursor's Task tool runs the subagent on the parent chat's model in two cases:

  • you use a personal Anthropic API key (BYOK), which Cursor staff confirmed on the forum, or
  • the model in the agent file is not enabled in your Cursor settings.

So an agent you tuned for Haiku bills at Opus rates, and nothing in the reply tells you.

I tried to fix it inside Cursor first. Hooks can see the model but cannot change it mid-flight. What does work: Claude Code, run headlessly from Cursor's Shell tool, honors the model: in agent files.

The fix: route subagents through Claude Code

Claude Code Subagents for Cursor is a skill that does that routing for you. You turn it on once per chat:

/use-claude-code-subagents

The agent answers Subagent mode: claude code. From then on, every custom subagent you ask for runs through claude -p on the model in its own file, and the reply ends with a receipt:

scout ran on claude-haiku-5-5

Say "use cursor subagents" to switch back to Cursor's Task tool.

What you need first

RequirementWhy
Cursor desktop, running locallyCloud Agents have no claude CLI
Claude Code 2.1.281 or later, signed inIt does the actual run. Check with claude --version
A POSIX shell (macOS or Linux)Briefs are passed with a < redirect. Native Windows is not supported

Runs bill your Claude Code account, not Cursor's.

Install

Pick one route. They all install the same skill.

Cursor plugin (recommended). In Cursor, open Customize → Plugins → Add → From GitHub Repository and enter:

github.com/ysskrishna/claude-code-subagents-for-cursor

Choose user scope to get it in every project.

skills.sh:

npx skills add ysskrishna/claude-code-subagents-for-cursor -a cursor -g

GitHub CLI:

gh skill install ysskrishna/claude-code-subagents-for-cursor --all --agent cursor --scope user

Without --agent cursor, gh installs for GitHub Copilot instead.

How the model in your agent file is read

model: in the agent fileWhat runs
haiku, sonnet, opusClaude Code's latest model of that family
starts with claude-That exact model, with Cursor-only suffixes (effort, speed, thinking) removed
missing, inherit, or another vendorNot routed. It falls back to Cursor's Task tool and tells you why in one line

One thing that surprised me: Cursor and Claude Code resolve aliases differently. When I last checked, Cursor mapped haiku to an older Haiku that many plans have disabled, while Claude Code maps it to its latest Haiku. So model: haiku can run on a newer model through this skill than it would in Cursor. That is intended.

Agent lookup works the way Cursor's does: project beats user, and inside a level .cursor/agents beats .claude/agents beats .codex/agents. Built-in agents such as explore keep using the Task tool.

Stop the approval prompts

Claude Code runs outside Cursor's sandbox, so pick a run mode that allows it in Cursor Settings → Agents → Approvals & Execution:

  • Auto-Review (with Sandbox): suggested. Commands outside the sandbox go through a safety check.
  • Run Everything (Unsandboxed): no prompts, for projects you trust.

The Allowlist modes are not supported, because they need an entry for every command.

On the Claude Code side, every run uses --permission-prompts none, so anything Claude Code would ask about is denied and reported back to you. Editing agents get --permission-mode acceptEdits; read-only agents get nothing extra. Nothing runs with permissions skipped.

How to tell it worked

  • The first reply after you invoke the skill says Subagent mode: claude code.
  • Every subagent answer ends with <agent> ran on <model>. If that model is not the one in the file, you caught it before the bill did.
  • Briefs live in a fresh mktemp -d folder outside your repo, so nothing lands in your commits.

Want a safe first run? The repo ships an example project with two agents: a read-only scout and a proofreader that can edit.

When you do not need this

  • Your parent chat model is already the one you want for every subagent.
  • You are on Cursor's own models with the agent's model enabled, and Task honors it.
  • You work in Cloud Agents or native Windows, where it cannot run.

What to do next

  1. Install the plugin from GitHub.
  2. Run /use-claude-code-subagents, then ask for your cheapest agent.
  3. Check the receipt line. Then look at your next usage report.

Further reading

Continue exploring

BlogCover image for How to Install Caveman in Cursor and Claude Code

How to Install Caveman in Cursor and Claude Code

AI Apps & Assistants
Agent Skills
+1
3 min read
BlogCover image for 17 Thinking Skills for AI Agents: Pre-Mortem, Five Whys, Six Hats and More

17 Thinking Skills for AI Agents: Pre-Mortem, Five Whys, Six Hats and More

AI Apps & Assistants
Agent Skills
4 min read
ToolCover image for AI Token Counter

AI Token Counter

AI token counter with model pricing and context-window comparison in your browser.

Chat & AI
AI Apps & Assistants
+1
CourseCover image for Prompt Engineering for Coding Agents

Prompt Engineering for Coding Agents

Write prompts that coding agents act on: clear goals, the right context, output contracts, examples, structured thinking, shorter answers and a tiny eval set.

Agent Skills
Chat & AI

8 chapters · 17 min

Productskills.sh+1Claude Code Subagents for Cursor

Claude Code Subagents for Cursor

Your Cursor subagents can finally run on the model you picked in each agent file.
Chat & AI
Agent Skills
+2
CourseCover image for Agent Building Blocks: Skills, Subagents, MCP and Hooks

Agent Building Blocks: Skills, Subagents, MCP and Hooks

A free, hands-on course on the four pieces behind Cursor and Claude Code agents: skills, subagents, MCP servers and hooks. Build each one, then combine them.

Agent Skills
Chat & AI
+1

9 chapters · 25 min