CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/sub-agent-delegation

Meta-skill: how to pass skills/context to Claude sub-agents that start with fresh context, with documented SDK gotchas.

94

1.50x
Quality

94%

Does it follow best practices?

Impact

96%

1.50x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

sub-agent-delegation-rules.mdrules/

Sub-Agent Delegation Rules

Platform-agnostic. The context-loss problem is the same on Claude Code and Copilot.

The universal rule

  • Sub-agents / extensions / participants start with FRESH context. They do NOT inherit parent's skills, history, or accumulated state.
  • Pass skills explicitly — every platform, every time.
  • Validate the handoff. First sub-agent action: echo received skills. Fail loudly on mismatch.

Claude Code

  • Inherit: CLAUDE.md, tool definitions, MCP servers.
  • Pass skills: AgentDefinition(skills=[...]) or inline in Task tool prompt.
  • context: fork is INVERTED (GH #20492) — creates blank, not copy.
  • AskUserQuestion unavailable in sub-agents (GH #34592).

VS Code Copilot

  • Agent mode persists within session BUT terminal commands and chat participants get fresh context.
  • Scripts the agent writes that spawn sub-processes inherit NOTHING from Copilot.
  • Pass skills: #file:path/to/SKILL.md in chat, or .github/copilot-instructions.md for always-on.

Cross-platform ground truth

Claude CodeVS Code Copilot
Shared contextCLAUDE.md.github/copilot-instructions.md
Per-request skillsAgentDefinition(skills=[...])#file:path/to/SKILL.md
Subprocess contextSub-agents start FRESHTerminal commands are bare
Handshakeecho-skills protocolsame pattern works

README.md

tile.json