fix: use 127.0.0.1 in internal HTTP clients to match daemon bind#436
Merged
tomasz-tomczyk merged 1 commit intomainfrom May 2, 2026
Merged
fix: use 127.0.0.1 in internal HTTP clients to match daemon bind#436tomasz-tomczyk merged 1 commit intomainfrom
tomasz-tomczyk merged 1 commit intomainfrom
Conversation
The daemon binds IPv4-only on 127.0.0.1 but internal HTTP clients used http://localhost:<port>. On macOS where the resolver returns ::1 first and Go's happy-eyeballs fallback doesn't kick in (resolver config or fast ECONNREFUSED on the IPv6 attempt), the client gets a connection refused error instead of reaching the daemon. Switch internal client URLs to 127.0.0.1 to match the bind. User-facing display strings and openBrowser() calls keep "localhost" — browsers do their own happy-eyeballs and "localhost" reads better. Closes #435 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #436 +/- ##
==========================================
+ Coverage 67.36% 67.39% +0.03%
==========================================
Files 35 35
Lines 9820 9820
==========================================
+ Hits 6615 6618 +3
+ Misses 2689 2687 -2
+ Partials 516 515 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
127.0.0.1, but internal HTTP clients usedhttp://localhost:<port>.localhostresolves to::1first and Go's happy-eyeballs fallback doesn't kick in (resolver config or fastECONNREFUSEDon the IPv6 attempt), the client gets connection refused instead of reaching the daemon.127.0.0.1(daemon health probes,waitForDaemonReady, review-cycle POSTs,fetchSessionFocus). User-facing display strings andopenBrowser()calls keeplocalhost— browsers do their own happy-eyeballs andlocalhostreads better.Test plan
go build ./...cleango test ./...passesCloses #435
🤖 Generated with Claude Code