Skip to content

wr-itil: work-problems Step 5 dispatch heredoc is unparseable under macOS /bin/bash 3.2 #345

Description

@tompahoward

Description

The work-problems Step 5 canonical dispatch wraps the iteration prompt in a heredoc-inside-command-substitution ($(cat <<'EOF' ... EOF)). macOS ships /bin/bash 3.2, whose command-substitution parser fails on this construct for some prompt bodies with "unexpected EOF while looking for matching ')'" — while bash 5.x parses the identical file fine, so a PATH-bash bash -n gives false confidence.

Symptoms

  • Background dispatch wrapper exits 2 with a bash parse error at the $(cat <<'EOF' line; the subprocess never spawns (zero-cost launch).
  • bash -n passes (bash 5.x) while /bin/bash -n fails (3.2) on the identical file.

Affected plugin / component

@windyroad/itil — work-problems SKILL Step 5 dispatch.

Fix direction

Write the prompt to a file and use $(cat "$PROMPT_FILE") — removes the heredoc-inside-substitution and is bash-3.2-safe regardless of prompt content.

Cross-reference

Reported from a downstream adopter; tracked locally as P116.

Versions

  • Local plugin: @windyroad/* (cache: itil 0.57.1)
  • Claude Code CLI: 2.1.201 (Claude Code)
  • Node: v22.17.1
  • OS: Darwin 25.3.0 x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions