Skip to content

claude-code parser: Task tool renamed to Agent — subagent calls fall through as "unknown" #173

Description

@JesseVent

Summary

Two things found while testing claude-code subagent behavior on real evals (funded Anthropic key, claude-code-haiku and claude-code-sonnet-5):

1. Parser bug. packages/core/src/agents/claude-code/parser.ts:31-55 maps the subagent tool as Task, but the pinned CLI (2.1.191, see runner.ts) actually calls it Agent. Every subagent call falls through and gets tagged "unknown" instead of agent_task. Confirmed across 3 separate runs. Doesn't affect eval pass/fail scoring (checked all 40 EVAL.ts scorers — none key off the normalized name field), but corrupts any tool-usage stats/dashboards built from these transcripts, including the AgentPrism trace viewer (pending in a separate, not-yet-merged PR).

Fix: add Agent: 'agent_task' to CLAUDE_CODE_TOOLS.tools.

2. Caveat, not a bug. Subagents don't inherit the skill catalog — documented Anthropic behavior, not an oversight. Confirmed it's inconsistent in practice: a Haiku subagent that never checked for skills wrote a deprecated RLS policy (auth.role(), matched against an invalid value — blocks everyone) and a view missing security_invoker (bypasses RLS). A Sonnet subagent, given the identical task, checked for skills on its own and got both right. Worth knowing when interpreting no-skills vs benchmark comparisons — not something to fix, since it's intended Claude Code behavior.

Repro: forced subagent delegation on a fixture eval targeting the exact traps the supabase skill's checklist names (BOLA/IDOR, views-bypassing-RLS), compared the subagent's raw SQL output with/without skill access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions