[FEATURE] Per-subagent effortLevel in agent frontmatter

Resolved 💬 4 comments Opened Mar 6, 2026 by milobird Closed Mar 6, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Subagent frontmatter supports model to choose between opus/sonnet/haiku per agent, but there is no equivalent for effort level. The CLAUDE_CODE_EFFORT_LEVEL environment variable applies globally to the entire session — all subagents inherit the same effort regardless of task complexity.

This is a problem for multi-agent pipelines where some agents do deep reasoning (analyzing requirements, cross-referencing sources, finding inconsistencies) and others do mechanical work (calling CLI tools, updating file metadata, running git commands). Setting high effort globally means mechanical agents spend unnecessary time thinking, directly impacting end-to-end latency. Setting low effort globally risks degrading the reasoning agents.

Proposed Solution

Add an effortLevel field to the supported frontmatter fields:

---
name: publisher
description: Syncs items to external services via CLI
model: sonnet
effortLevel: medium
---

Accepted values: low, medium, high, max, inherit (default, matching current behavior).

This mirrors how model already works — sensible default (inherit) with per-agent override when needed. The --agents CLI flag JSON format would accept the same field.

Alternative Solutions

  • Current workaround: Downgrading mechanical agents from opus to sonnet helps with output generation speed but doesn't address the thinking overhead from a globally-set high effort level.
  • Hooks-based approach: A SubagentStart hook could theoretically modify environment variables, but CLAUDE_CODE_EFFORT_LEVEL is read at process start, not per-turn, so this wouldn't work.
  • Split into separate sessions: Running mechanical agents as separate claude processes with different env vars would lose session context.

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

A multi-agent pipeline where some agents reason deeply about requirements and others mechanically create tickets and sync strings via CLI tools. The reasoning agents need high effort; the mechanical agents would produce equivalent output at medium effort but currently inherit the global high setting, adding unnecessary latency.

Additional Context

The infrastructure for this likely exists already — the SDK model info includes supportsEffort and supportedEffortLevels fields (added in 2.1.50), and effort level is already configurable globally. This feature would extend that configurability to the per-agent level, consistent with how model already works in frontmatter.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗