Repository navigation
Conversation
pancacake
added a commit
that referenced
this pull request
Aug 6, 2026
…ack everywhere #784 fixed the launcher, but the same address is rendered on two other paths that kept "localhost": the Docker entrypoint (render_environment) and the last-resort default in web/proxy.ts. On a dual-stack host that name resolves to ::1 first while uvicorn binds 0.0.0.0 (IPv4 only), so every rewritten /api/* request fails to connect — the launcher and container paths are meant to stay in sync, and after #784 they no longer did. Also disambiguates the two same-named _optional_positive_int helpers added by #774: catalog's drops junk from a live API response, contracts' rejects it as cache corruption. Same name, opposite behaviour — the strict one is now _require_optional_positive_int and says why it differs.
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.
Description
The native launcher currently gives the frontend's Node proxy a
localhostbackend URL. On affected Windows hosts, Node resolves that hostname to::1while the locally launched uvicorn backend is reachable over IPv4, so proxied API requests fail with HTTP 500.This change uses
127.0.0.1for that internal proxy connection, both for the configured backend port and after port-conflict resolution. Browser-facing URLs remain unchanged. A regression test covers both launcher paths.Related Issues
Module(s) Affected
agentsapiconfigcoreknowledgeloggingservicestoolsutilsweb(Frontend)docs(Documentation)scriptstestsruntime launcherChecklist
pre-commit run --all-filesand fixed any issues.Additional Notes
Regression evidence:
http://localhost:8001andhttp://localhost:8123.Verification:
The repository-wide pre-commit command is not clean on the current
devbaseline because formatting hooks rewrite unrelated tracked frontend build artifacts and existing web source files. Those unrelated changes are not included in this PR; all CI-equivalent non-mutating checks and all hooks covering the changed files pass.