Skip to content

priority: parallel hooks will end-up triggering Too many open files (os error 24) #1696

@ssbarnea

Description

@ssbarnea

Summary

I spotted this issue with multiple hooks from https://github.com/pre-commit/pre-commit-hooks.git

Apparently commenting one or two of them or using different priorities is the only workaround I was able to find.

error: Failed to run hook `trailing-whitespace`
  caused by: Failed to setup subprocess for pty
  caused by: Too many open files (os error 24)

Willing to submit a PR?

  • Yes — I’m willing to open a PR to fix this.

Platform

macos-latest

Version

prek 0.3.3 (c741c8c 2026-02-15)

.pre-commit-config.yaml

hooks:
  - repo: https://github.com/pre-commit/pre-commit-hooks.git
    rev: v6.0.0
    hooks:
      - id: check-added-large-files
        priority: 0
      - id: check-merge-conflict
        priority: 0
      - id: check-symlinks
        priority: 0
      - id: debug-statements
        priority: 0
      - id: detect-private-key
        priority: 0
      - id: end-of-file-fixer
        priority: 0
      - id: trailing-whitespace
        priority: 0

Log file

prek run -a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions