fix: avoid blocking stale PreToolUse relays#94858
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close this PR as superseded: the useful stale no-policy PreToolUse fallback is already implemented by the merged guarded fallback, while this branch broadens the same path into a fail-open behavior for unknown or policy-active PreToolUse relay outages. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this branch in favor of the shipped guarded fallback from #88846, and keep any broader restart/drain repair on the open canonical relay lifecycle issue with fail-closed policy semantics preserved. So I’m closing this here and keeping the remaining discussion on #88846. Review detailsBest possible solution: Close this branch in favor of the shipped guarded fallback from #88846, and keep any broader restart/drain repair on the open canonical relay lifecycle issue with fail-closed policy semantics preserved. Do we have a high-confidence way to reproduce the issue? Partially: source inspection shows the current fail-closed fallback and the proposed fail-open broadening, but no live stale Codex relay run was executed in this read-only review. Is this the best way to solve the issue? No: the broad default no-op path is not the best fix because current main deliberately records no-op only when local PreToolUse work is absent; the safe implementation already shipped through the merged guarded fallback. Security review: Security review needs attention: Security review needs attention because the diff broadens a PreToolUse tool-policy fallback from guarded fail-closed to default no-op.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against f26f45c050cc; fix evidence: release v2026.6.8, commit fb64546d9e6f. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
PreToolUsenative hook relays to an observational no-opPermissionRequesthandling fail-closedRationale
When a Codex app-server subagent keeps a stale native hook relay command after the originating OpenClaw relay is gone, shell and patch tools can fail with
Native hook relay unavailable.For
PreToolUse, this should not hard-block tool execution when the relay itself is missing. The relay cannot provide policy enforcement at that point, and blocking strands otherwise valid subagent work. This change preserves fail-closed behavior for permission requests while makingPreToolUseunavailable handling observational.Validation
git diff --checkPreToolUserelay falls back to no-op and Codex subagentpwd && truesucceedsNot Run
pnpm installrepeatedly timed out fetching native packages from npm (@openai/codex,@github/copilot,@zed-industries/codex-acp-darwin-arm64,@lancedb/lancedb-darwin-arm64,@anthropic-ai/claude-agent-sdk-darwin-arm64).