Skip to content

Matrix harness: 'storyboard run --webhook-receiver' subprocess hangs to 120s when invoked via spawnSync #1237

Closed

Description

@bokelley

Symptom

Direct CLI invocation completes in ~1.3s with full JSON output:

node bin/adcp.js storyboard run http://127.0.0.1:4900/mcp sales_social --json --allow-http \
  --auth sk_harness_do_not_use_in_prod --webhook-receiver

Same args via spawnSync from the matrix harness (agent-skill-storyboard.ts:runGrader) hits the 120s timeout:

[harness] grader: status=null signal=SIGTERM error=spawnSync node ETIMEDOUT stdout=0b stderr=0b

Reproducible across multiple verify-mode runs against a clean workspace (no zombie agents, ports 4900/4950 confirmed clear via lsof).

Hypothesis

--webhook-receiver boots a local HTTP listener. The grader's exit path may not always close it cleanly, so on subsequent harness-driven runs the bind leaks. From outside the harness it works because each direct invocation gets a fresh address. The harness's spawnSync may be hanging on the listener's open socket.

Other possibilities:

  • The receiver waits for an inbound webhook that the agent never sends (storyboard has a webhook step, agent's response is async, harness's grader timeout is hit before the webhook arrives).
  • stdio buffering in spawnSync that the direct shell flushes differently.

Why this matters now

The matrix harness's verify step relies on runGrader returning a parseable JSON result. Empty stdout + ETIMEDOUT makes the harness misreport storyboard=fail regardless of actual storyboard outcome. Concretely: the matrix-blind-fixtures validation run reports storyboard=fail, traffic=façade when running via the harness; running the grader directly against the same agent produces overall_status: passing with a full traffic profile.

The traffic-check signal is independent and still works (which is the whole point of the redesign). But the harness's secondary signal — storyboard pass/fail — is unreliable until this is fixed.

Workaround

runGrader could fall back to spawning without --webhook-receiver when the storyboard track doesn't require webhook conformance. Or the receiver's port could be passed in explicitly so the harness can guarantee a clean port per run.

Evidence

Activity

  1. added
    claude-triaging
    on May 1, 2026
  2. added a commit that references this issue on May 1, 2026
    7052176
  3. bokelley commented on May 1, 2026

    @bokelley
    ContributorAuthor

    Triage

    Classification: Bug
    Bucket(s): conformance
    Status: drafting-pr

    What the experts said:

    • code-reviewer: spawnSync is the root cause — it blocks the parent event loop while the CLI's webhook-wait step hangs indefinitely. Option A (async spawn + Promise, close event for parsing) is correct; no changeset required since scripts/ is not in the published files array.
    • dx-expert: Silent storyboard=fail with empty stdout is the worst error class — no attribution between harness hang and agent failure. Async spawn eliminates the structural problem; kill-timer diagnostic log with storyboard ID and reproduction command closes the DX gap.

    My take: Both experts agree on the fix. Opened draft PR #1241 replacing spawnSync with async spawn + Promise in runGrader, adding a SIGTERM→SIGKILL escalation, and a one-line doc note in VALIDATE-YOUR-AGENT.md. No changeset needed.


    Triaged by Claude Code. Session: https://claude.ai/code/session_01UmeaV8QBFCrPvjqPdgEkqp


    Generated by Claude Code

  4. added
    bug
    and removed
    claude-triaging
    on May 1, 2026
  5. added 5 commits that reference this issue on May 1, 2026
    e1da1f5
    eb03f1b
    5d66c8c
    60d1ca1
    bcd2d0a
  6. added a commit that references this issue on May 23, 2026
    89471b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugclaude-triagedconformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions