Repository navigation
fix(hooks): continue tool calls when the Hermes bridge cannot start - #46
Conversation
Missing python and a plugin that fails to load rejected before_tool_call, so every tool failed closed. Ignore only bridge startup failures there, and skip a plugin whose register() raises. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 6:34 AM ET / 10:34 UTC (Revision 2). ClawSweeper reviewWhat this changesBabelfish skips Python for freshly verified absent or empty Hermes installations while propagating installed pre-tool guard failures, with focused tests and compatibility documentation. Merge readiness✅ Ready for maintainer review This PR remains necessary: main still requires Python even when no Hermes plugins are installed. The repaired head resolves the earlier findings, and the captured host tool-effect evidence supports the guard-preserving behavior. No actionable introduced defect remains. Priority: P1 Review scores
Verification
How this fits togetherBabelfish translates installed agent plugins into OpenClaw hooks and middleware. Before host tool execution, its Hermes bridge gathers argument changes and blocking decisions alongside imported Claude Code and Codex hooks. flowchart LR
A[Host tool request] --> B[Babelfish pre-tool handler]
B --> C[Check Hermes installation]
C -->|Absent or empty| E[Imported plugin guards]
C -->|Installed or unknown| D[Hermes bridge decisions]
D -->|Successful evaluation| E
D -->|Failure| F[Prevent tool execution]
E --> G[Allow or block host tool]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain the narrow verified-absence fallback and preserve installed guard evaluation before host tool execution. Do we have a high-confidence way to reproduce the issue? Yes: main unconditionally starts the Python bridge for pre-tool middleware and hooks, so an absent interpreter rejects tool preparation even with an empty Hermes installation. This review established the path from source rather than executing it. Is this the best way to solve the issue? Yes: checking verified absence within the existing request lane repairs availability without skipping installed guards or creating a competing execution path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 75d94845ee29. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Summary
./.., and Python-owned home expansion do not establish absence. Explicit tools, commands, CLI commands, and skills still require Python.Compatibility
src/index.tsandsrc/session-start-pending.test.tsare byte-for-byte unchanged.Exact-head verification
Reviewed/tested head:
7958e361651c124af2f4d609c0fa2334ff44cf4b.Integrated main:
75d94845ee297f1165a92d3af7ee16ef6118833f.Original contributor head retained as an ancestor:
89a8916e8a22669405b900e73f4a5ea22da791f7.git diff --check; both ancestry checks; protected main file equality; unchanged package/dependency inputs.npm run build.npm run check: 218 passed / 13 files.npm run pack:check: 24 files / 294,387 unpacked bytes.2b4055f8dd703e9c09985940dce9a9c6fc3c29bf.CHANGELOG.md; public diff and this description scrubbed of private paths and generated artifacts.Proof bounds: production host evidence is pinned to 2026.9.7, not every host release. Unreadability uses a mocked
EACCES; dangling/dot-path unit probes exclude Windows. Hosted Windows CI remains a required gate. The independent review inspected the retained runtime evidence but did not independently rerun it.Final tool-effect evidence
Both native OpenClaw and Codex adapters registered the built plugin and exercised the real host tool path in isolated temporary HOME/state directories. Allowed cells produced exactly one receipt; denied cells produced zero tool I/O.
All cells passed. The package/host proof uses fixtures only, not live OpenClaw state.
Landing gates
Contributor credit: Sebastien Tardif (@SebTardif).