[BUG] Plugin agents in 2.1.2 execute as Task subprocesses instead of inline, breaking AskUserQuestion interaction

Resolved 💬 3 comments Opened Jan 9, 2026 by craigtsmith Closed Jan 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

In Claude Code 2.1.2, plugin agents are being executed as Task subprocesses that complete and return, rather than running inline with direct user interaction.

When invoking a plugin command that delegates to an agent with AskUserQuestion in its tools, the agent:

  1. Spawns as a Task subprocess
  2. Completes immediately with "0 tool uses" (AskUserQuestion not invoked)
  3. Returns questions as plain text that Claude relays

Example output in 2.1.2:

❯ /myplugin:ask-expert

⏺ myplugin:my-expert(Consult expert)
  ⎿  Done (0 tool uses · 13.4k tokens · 8s)

⏺ The expert needs to understand a few things first:
  1. What are your requirements?
  2. What constraints do you have?

The agent outputs questions as text instead of using AskUserQuestion, so users cannot respond interactively.

What Should Happen?

The agent should run inline and use AskUserQuestion directly, allowing interactive user responses.

Expected behavior (as in 2.1.1):

❯ /myplugin:ask-expert

⏺ I'm the expert, here to help...

⏺ User answered Claude's questions:
  ⎿  · What are your requirements? → [user selections]

⏺ [Agent continues with response based on user answers]

The agent should invoke AskUserQuestion, user sees interactive questions, answers them, and the agent continues its workflow with that information.

Error Messages/Logs

Steps to Reproduce

  1. Create a plugin with an agent that has AskUserQuestion in its tools:
name: my-expert
tools: ["Read", "Grep", "Glob", "Task", "AskUserQuestion"]
---
You are an expert advisor. Use AskUserQuestion to gather requirements from the user before providing recommendations.
  1. Create a command that delegates to that agent:
name: ask-expert
description: Consult the expert
---
Delegate to the my-expert agent.
  1. Invoke the command: /myplugin:ask-expert
  1. Observe that the agent completes as a Task subprocess with "0 tool uses" and questions are output as plain text instead of interactive AskUserQuestion prompts.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.1

Claude Code Version

2.1.2 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Key differences between 2.1.1 and 2.1.2:

| Aspect | 2.1.1 | 2.1.2 |
|--------|-------|-------|
| Execution | Inline | Task subprocess |
| AskUserQuestion | Works directly | Not used (0 tool uses) |
| User interaction | Interactive questions | Text relay (no response possible) |
| Agent completion | After full workflow | Immediately returns |

The 2.1.2 changelog doesn't mention changes to agent execution. Possibly related to agent_type in SessionStart hook changes or output handling changes?

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗