Skip to content

Grilling: formalize the subagent-nesting parent-inference rule (including parallel/batch tool calls) #277

Description

@antejavor

Part of #275

Question

Given no harness provides an explicit parent link for a spawned subagent, temporal inference (whichever tool call is "open" -- PreToolUse fired, no matching PostToolUse yet -- when SubagentStart arrives) was proposed as the general answer. But Claude Code's PostToolBatch event ("after a full batch of parallel tool calls resolves") implies tool calls can run in parallel/batched, breaking the assumption that exactly one tool call is ever "open" at a time.

Resolve concretely: what's the actual inference rule once parallel/batched tool calls are accounted for? Candidates to grill through: only tool calls matching a specific tool_name (the "Agent"/subagent-spawning tool specifically, not any open call) are eligible parents; some other disambiguation when multiple Agent-type calls are simultaneously open; or accepting an explicit ambiguity/best-effort answer in that rare case rather than a fully deterministic rule. Resolve with the driving user via /grilling + /domain-modeling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions