[Bug] Workflow tool permission handler injects control characters on Windows, failing schema validation

Status Open
Reported on v2.1.292
Maintainer reply None cached
Activity 0 comments · opened Oct 8, 2026

Bug Description
Title: Workflow tool cannot launch — permission handler returns updatedInput that fails
"script contains control characters" validation (Windows)

Env: Windows 11 Home 10.0.26300, Claude Code (desktop / Remote Control client),
Bun 1.4.0, Node 24.15.0, Git Bash + PowerShell. Model claude-opus-5-5.

Steps:

  1. Repo has .claude/workflows/animated-components-family.js (21.5 KB, LF only,

no tabs/CR/Cc/Cf/zero-width chars — verified with Python unicodedata scan).

  1. Exit auto mode. Call Workflow with scriptPath=<that file>, or name=..., or via

the auto-generated skill. All three paths fail the same way.

Actual:
"The permission handler returned updatedInput for Workflow that failed schema
validation: [{code: custom, path: [script], message: script contains control
characters that would be hidden in the approval dialog}] ... This is a
configuration issue in your canUseTool callback, PermissionRequest hook, or
permission-prompt tool."
No approval dialog is shown.

Expected: approval dialog appears; workflow runs.

Notes:

  • No user/project/plugin PreToolUse or PermissionRequest hook matches Workflow

(checked ~/.claude/settings*.json, .claude/settings.local.json, all plugin hooks.json).

  • Source file is clean, so the client callback seems to alter script

(suspect CRLF/\r injection on Windows) before validation.

  • In auto mode the same call is denied by the classifier ("Modify Shared Resources"),

so there is no path to launch a saved workflow from this client.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.292
  • Feedback ID: 4ceaf334-7aaf-4789-963a-f40d2e37fe69

View original on GitHub ↗