Skip to content

fix(skills): shipped skills and hooks assume a timeout binary — absent on stock macOS, so the QA build check and the foreground-run advice fail with 'command not found' #1054

Closed

Description

@admarble

Tier: mechanical Found: 2026-09-11 while syncing 12 local projects on a Mac without Homebrew coreutils Scope corrected the same day (see below)

What happened

timeout is a GNU coreutils command; stock macOS does not ship it. The runner's own loop wrapped twelve syncs in timeout and silently ran nothing ("command not found" swallowed by a grep).

What is actually affected (corrected)

Change

Prose and hook message only: keep timeout N … as the primary form and add one line — macOS: brew install coreutils; portable fallback perl -e 'alarm shift; exec @ARGV' N <cmd…>. Plus a behavioural test pinning the fallback (it is the form the docs now recommend) and the existing skill gate extended.

Acceptance criteria

  • AC-1: the perl fallback enforces the limit — Verify: npx vitest run src/lib/__tests__/timeout-fallback.test.ts → perl -e 'alarm shift; exec @ARGV' 1 sleep 5 exits non-zero within 3 s. Mutation: remove alarm shift; → the test fails (sleep runs to completion); restore.
  • AC-2: /exec §3, /verify, and the hook message name coreutils and the perl fallback next to the timeout form, in all three skill copies and all hook copies — Verify: npx vitest run src/lib/__tests__/exec-skill-foreground-rule.test.ts (extended to assert coreutils) → green; grep -c coreutils templates/hooks/pre-tool.sh .claude/hooks/pre-tool.sh hooks/pre-tool.sh .claude/skills/verify/SKILL.md → all ≥ 1.
  • AC-3: suite green — npm run build && npm test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions