Custom subagents should support opting out of CLAUDE.md / git status injection

Open 💬 0 comments Opened Jun 17, 2026 by riptscripts

Feature Request

Custom subagents (defined in .claude/agents/) always load CLAUDE.md and git status into their context, with no way to opt out. The built-in Explore and Plan agents skip both, making them significantly lighter and faster to start.

Problem

There is no frontmatter field or setting to control whether a custom agent loads CLAUDE.md and git status. This forces users who want lightweight, task-specific agents into a workaround: defining a skill with context: fork + agent: Explore and embedding all custom instructions in the skill body. It works, but it means every lightweight agent must be a skill — you cannot define a reusable lightweight agent that multiple skills or delegation prompts can reference.

Proposed Solution

A frontmatter field on custom agent definitions (e.g. includeContext: minimal or skipClaudeMd: true) that gives custom agents the same context-stripping behavior as Explore and Plan. This would let users define fast, purpose-built agents with custom tool sets and instructions without inheriting the full session context.

Use Case

Lookup agents that search documentation, query APIs, or perform read-only code analysis. These agents do not need project conventions from CLAUDE.md or git state — they need a focused prompt, a constrained tool set, and minimal startup overhead. Today, the only path to this is the skill + Explore workaround.

View original on GitHub ↗