- Symptoms
- After upgrading to 2.4.1, hooks that used to run in a predictable order now interleave. Symptom pattern: a PreToolUse hook that writes a state file (e.g. a lint cache or an audit log line) and a second hook that reads it now intermittently sees a missing or half-written file. You get flaky 'block' decisions, duplicate log lines, or hooks that pass locally and fail in CI. Nothing in the session transcript indicates a problem; you have to diff hook output timestamps to see the overlap.
- Likely cause
- The 2.4.1 changelog line 'improved hook performance' turns out to mean hooks for matching matchers are now spawned with Promise.all instead of awaited in sequence. Hooks within a single matcher entry still run in order; it's across matcher entries that ordering is gone.
- Affected versions
- 2.4.1
- Environments
- Any project with two or more PreToolUse/PostToolUse matcher entries that share state
- Operating systems
- macOS, Linux, Windows
- Confidence
- High confidence
This one bit us within an hour of the auto-update. Our PostToolUse formatter hook and our git-add hook raced and we ended up committing unformatted files. Flagging because the failure is silent: the session looks completely normal.