Skip to content

Agent SDK: Subagent delegation broken in query() mode — pinned to v0.2.51 pending upstream fix #32

Description

@Number531

Summary

The Claude Agent SDK's Agent tool (formerly Task) was broken in query() mode starting from v0.2.63+. Resolved: SDK upgraded to 0.2.70 in commit a79e43a (2026-03-08). Subagent delegation is working. Defensive allowedTools added in commit 49dc024.

This issue now tracks remaining validation items from the original upgrade plan.

Current State (2026-03-10)

  • SDK version: @anthropic-ai/claude-agent-sdk@0.2.70 (no longer pinned to 0.2.51)
  • Subagent delegation: ✅ Working — model finds and uses Task tool via agentQuery()
  • allowedTools: Defensive array includes both Task and Agent for name instability resilience
  • Full analysis: docs/pending-updates/0.2.47-0.2.70-update.md

Resolved Items

Remaining Validation (narrowed scope)

  • Effort override (feat(skills): add deep-plan + super-plan planning skills #214): Verify effort: 'high' is not silently overridden to medium by SDK 0.2.70. Our orchestrator sets effort: 'high' in agentQuery() (claude-sdk-server.js line 1157). Upstream #214 reported SDK 0.2.68+ may downgrade this.
  • Hook native fields: Verify hook events carry agent_id/agent_type natively (v0.2.69 feature) — currently using string-matching heuristics in classifyAgent() (hookSSEBridge.js:16-64). If native fields are present, simplify classifyAgent().
  • MCP disconnect: Verify no MCP server disconnects during long runs (29-subagent memo generation). This was a known issue in pre-0.2.69 versions.

Files Involved

File Relevance
package.json:50 SDK version (now 0.2.70)
src/server/claude-sdk-server.js:1151-1199 agentQuery() with agents and allowedTools
src/utils/hookSSEBridge.js:16-64 classifyAgent() — can simplify if native fields available
docs/pending-updates/0.2.47-0.2.70-update.md Full upgrade analysis

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-upstreamBlocked on upstream dependency fixbugSomething isn't workinginfrastructureBackend/infrastructure changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions