v2.4.0: Container Mode and MCP Server
Pitchfork v2.4.0 adds container mode for running pitchfork as PID 1 inside Docker containers and introduces an MCP server that exposes daemon management to AI assistants like Claude and Cursor. This release also fixes a file descriptor exhaustion issue on macOS and corrects working directory resolution for .config/pitchfork.toml projects.
Highlights
- Container mode: Run pitchfork as your Docker entrypoint with proper zombie reaping and graceful shutdown handling.
- MCP server: AI coding assistants can now start, stop, restart, and inspect your daemons through the Model Context Protocol.
Added
-
Container mode (
--container) -- When running as PID 1 inside a Docker container, pitchfork now handles the two critical init responsibilities: reaping orphaned zombie processes and forwarding termination signals through its graceful shutdown sequence. On Linux, the reaper useswaitid(WNOWAIT)to peek at zombies without stealing exit statuses from managed daemons. On macOS (for local development), a fallback strategy stashes reaped statuses for recovery. Enabled via CLI flag, environment variable, or config. This feature is marked experimental. (#305) - @gaojunran# Dockerfile ENTRYPOINT ["pitchfork", "supervisor", "run", "--container"]
# Or via config [settings.supervisor] container = true
-
pitchfork mcpcommand -- Starts a Model Context Protocol server over stdin/stdout, allowing MCP-aware AI assistants to manage daemons programmatically. Exposes five tools:pitchfork_status,pitchfork_start,pitchfork_stop,pitchfork_restart, andpitchfork_logs. (#311) - @gaojunran// claude_desktop_config.json { "mcpServers": { "pitchfork": { "command": "pitchfork", "args": ["mcp"] } } }
Fixed
-
macOS "Too many open files" errors -- Switched from kqueue to FSEvent for file watching on macOS. The kqueue backend required one file descriptor per watched file, which could exhaust the descriptor limit on large projects. The FSEvent backend in notify v8 now supports file-level event reporting (via
kFSEventStreamCreateFlagFileEvents), so the original reason for using kqueue no longer applies. (#301) - @gaojunran -
Incorrect base directory for
.config/pitchfork.toml-- When using the.config/pitchfork.tomlor.config/pitchfork.local.tomllayout, the working directory and watch paths were incorrectly resolved relative to the.config/directory instead of the project root. The base directory is now correctly set to the grandparent (the directory containing.config/). (#307) - @gaojunran
Full Changelog: v2.3.0...v2.4.0