Plugins: deferred tools (AskUserQuestion) unavailable in skill context — need preload-tools frontmatter

Resolved 💬 3 comments Opened Apr 14, 2026 by morpheums Closed Apr 18, 2026

Problem

Plugin skills that need AskUserQuestion (or other deferred tools) cannot reliably use them. The tool schema is not loaded in the skill's execution context, causing either "tool not available" errors or silent empty-response failures.

Current behavior

  1. AskUserQuestion is a deferred tool — its schema isn't in context by default.
  2. Listing it in a skill's allowed-tools frontmatter only grants permission; it does NOT pre-load the schema.
  3. When a skill tries to call AskUserQuestion, it fails because the schema isn't loaded.
  4. Additionally, when AskUserQuestion IS in allowed-tools, the permission system's early-return path bypasses requiresUserInteraction(), causing silent empty answers (related: #29547).

Workarounds attempted

  1. ToolSearch pre-flight instruction in SKILL.md — Added "run ToolSearch with query select:AskUserQuestion" as step 0 in all interactive skills. Problem: the LLM executing the skill doesn't reliably follow this instruction. It's a prompt-level workaround with no enforcement.
  1. Removing AskUserQuestion from allowed-tools — Addresses the silent-failure bug from #29547, but doesn't solve the deferred-schema loading problem.

Neither workaround reliably ensures the tool is available when the skill runs.

Proposed solution

Add a preload-tools field to skill YAML frontmatter that guarantees deferred tool schemas are loaded into the skill's execution context before the skill runs:

---
name: my-plugin:config
description: Configure the plugin
allowed-tools: Read, Write, Edit, Bash
preload-tools: AskUserQuestion
---

When the skill is invoked, the runtime would load the schemas for all tools listed in preload-tools (via the same mechanism ToolSearch uses) before handing control to the LLM. This makes the tool reliably available without depending on the LLM following a prompt instruction.

Environment

  • Claude Code CLI (latest)
  • Plugin installed via --plugin-dir / ~/.claude/plugins/
  • Skills with context: fork
  • macOS (Darwin 25.2.0)

Impact

Any plugin that uses interactive prompts via AskUserQuestion is affected. This is a foundational capability for plugin skills that need user input (config wizards, setup flows, confirmation prompts).

View original on GitHub ↗

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