Skip to content

v12.15.1 — Hook hardening: internal stdin deadline + explicit hook timeouts

Latest

Choose a tag to compare

@AytuncYildizli AytuncYildizli released this 04 Jul 08:35
846d1a3

Hook hardening (patch)

No behavior change for normal use. This release makes the hook scripts structurally unable to hang:

  • prompt-gate.js and stop-gate.js now read stdin asynchronously with a 3-second internal deadline (REPROMPTER_HOOK_DEADLINE_MS to tune) and a 2MB input cap. A never-closing stdin pipe previously blocked forever; now the script exits 0 silently on its own (verified: exit at 3.07s, zero output).
  • Plugin hooks carry an explicit timeout: 10, so even a pathological case is bounded at 10 seconds quietly instead of the harness's 30-second default.
  • Output for normal piped input is byte-identical, guarded by fixture tests. New tests hold stdin open without closing it and assert self-termination.

Plugin users: /plugin marketplace update reprompter, then start a new session. 344 tests + 4 benchmarks green.