Repository navigation
fix: deliver managed daemon hooks without the system proxy - #1351
Merged
willkill07 merged 1 commit intoOct 14, 2026
Merged
willkill07 merged 1 commit into
willkill07 merged 1 commit into
Conversation
`nemo-relay daemon hook` built its reqwest client with the default system-proxy behavior, so a user's HTTP_PROXY/http_proxy/ALL_PROXY applied to the daemon's http://127.0.0.1 address unless NO_PROXY listed that exact IP. Any proxy that cannot connect back to the client's loopback made every managed hook delivery fail; with the fail-closed exit code 2 this blocks all tool calls in Claude Code and Codex while the daemon is healthy. Disable the proxy for daemon hook delivery, matching the gateway hook client in hooks/delivery.rs and the MCP control connection, which already dial the daemon directly. Add a regression test that points every proxy variable at a closed loopback port, clears NO_PROXY, and asserts delivery still reaches the daemon. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Tianyang Che <[email protected]>
Contributor
Author
|
Local verification (macOS arm64, Rust 1.96.1): |
Contributor
willkill07
approved these changes
Oct 14, 2026
Member
|
/ok to test ad342e4 |
willkill07
enabled auto-merge (squash)
October 14, 2026 21:24
willkill07
disabled auto-merge
October 14, 2026 21:36
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
nemo-relay daemon hookbuilt its reqwest client with reqwest's default system-proxy behavior, so a user'sHTTP_PROXY/http_proxy/ALL_PROXYapplied to the daemon'shttp://127.0.0.1address unlessNO_PROXYlisted that exact IP. Any proxy that cannot connect back to the client's loopback made every managed hook fail; with 0.10.1's fail-closed exit code2, that blocks all tool calls in Claude Code and Codex while the daemon is healthy. Disable the proxy for daemon hook delivery, matching the gateway hook client inhooks/delivery.rsand the MCP control connection, which already dial the daemon directly.Details
crates/cli/src/daemon/hook/mod.rs: add.no_proxy()to the hook delivery client. No API, configuration, or exit-status changes; fail-open and fail-closed policies, timeouts, and redirect handling are unchanged.crates/cli/tests/coverage/daemon/hook_tests.rs: addhook_forward_ignores_proxy_environment_for_the_daemon_address, which pointsHTTP_PROXY,HTTPS_PROXY,ALL_PROXY(and lowercase variants) at a closed loopback port, clearsNO_PROXY, and asserts that delivery still reaches the daemon directly. The test holds the sharedENV_TEST_LOCKand restores the environment on drop; it fails without the fix witherror sending request.release/0.10because the regression is user-visible on 0.10.1 managed deployments; the code is identical onmain.Validation:
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo test -p nemo-relay-cli --lib daemon::hook::tests(see PR comment for output).Where should the reviewer start?
crates/cli/src/daemon/hook/mod.rs(forward), then the new test at the end ofcrates/cli/tests/coverage/daemon/hook_tests.rs. The design question is whether daemon hook delivery should ever use a forward proxy; the existing gateway client and the WebSocket control channel already say no.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
nemo-relay daemon hookapplies HTTP_PROXY/ALL_PROXY to the loopback daemon address, so fail-closed hooks fail whenever a proxy is configured #1350🤖 Generated with Claude Code
Summary by CodeRabbit