Feature: optional fail-closed pre-action hook contract
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start by tracing the existing PreToolUse hook configuration and the --unsafe-auto-allow approval path, then review how hook results and run-log failures are represented. Done means the opt-in policy preserves the default behavior, applies deterministic allow or deny handling for every listed failure, records safe diagnostics, and leaves post-action hooks advisory.
Written by the indexing model from the issue text.
Description
Problem
Pool's lifecycle hooks are documented as fail-open. That is a sensible default for ordinary automation, but it means a timeout, process error, or malformed response silently allows the pending action. Security and governance integrations therefore cannot honestly treat a hook as a pre-action enforcement boundary.
I verified the adjacent MCP path locally with Pool 1.0.15: a version-pinned command server (npx --yes --package thumbgate@1.35.0 thumbgate serve) was discovered, and thumbgate__search_lessons completed successfully from pool exec. MCP discovery works, but MCP availability does not guarantee that an agent calls the gate before every consequential tool action.
Proposed contract
Keep today's behavior as the backward-compatible default, and add an opt-in fail-closed policy for pre-action hooks only:
hooks:
PreToolUse:
- command: governance-check
timeout_ms: 500
failure_policy: deny # existing default remains allow
Suggested acceptance criteria:
failure_policyis explicitlyallowordeny; omitted means today's fail-open behavior.- A required pre-action hook can return a documented allow/deny JSON result.
- Timeout, non-zero exit, invalid JSON, and process-start failure follow the configured policy deterministically.
- The run log records hook name, elapsed time, result, and failure category without payload secrets.
--unsafe-auto-allowaffects interactive tool approvals but does not silently bypass a configured required hook.- Post-action and notification hooks remain advisory/fail-open.
- Tests cover allow, deny, timeout, crash, invalid output, and the default compatibility path.
Interoperability proof
I added a Pool settings example and an explicit enforcement-boundary note in ThumbGate PR https://github.com/IgorGanapolsky/ThumbGate/pull/3647. It does not claim a Poolside partnership or endorsement. Until a fail-closed contract exists, the adapter keeps Pool's native permissions and sandbox as the hard boundary and treats ThumbGate MCP as an additional governance surface.
If this direction fits Pool's security model, I would be happy to collaborate on a small interoperability example or acceptance tests against the public contract.
- Dominant language
- No language data
- Stars
- 426
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from poolsideai/pool
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
poolsideai/pool#49 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
poolsideai/pool#29 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
poolsideai/pool#26 · 2 comments ·
-
herdr Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
poolsideai/pool#48 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
poolsideai/pool#47 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
type/automation type/performance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
bug cli
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100