Repository navigation
Conversation
A Bot with no endpoint (Run it here) is bound to MANAGED_AGENT_AG_UI_URL. When that address was on loopback, every message failed at the endpoint check, even though the address is the deployment's own setting rather than something a person typed. The managed agent's host and port (and a picked harness URL, when one is installed) now join the allowed hosts the endpoint check consults, so only person-typed addresses go through the private-network refusal. Fixes CopilotKit#888
sx4im
requested review from
MikeRyanDev,
davidmckayv,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
October 31, 2026 18:08
Daniellekaj
approved these changes
Nov 1, 2026
This branch has not been 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.
What this changes
Fixes #888. A Bot with no endpoint ("Run it here") is bound to the deployment's managed agent (
MANAGED_AGENT_AG_UI_URL). When that address was on loopback, every message to the Bot failed at the endpoint check ("this deployment will not dial ... : that address is inside OpenBot's own network"), even though the address is the deployment's own setting, not something a person typed.The managed agent's host and port (and a picked harness URL when one is installed) now join the allowed hosts the endpoint check consults, so only person-typed addresses go through the private-network refusal. The never-allowed list is still checked first, so this cannot admit the metadata address or a non-web address.
Where it runs
Config parsing at boot; the set is built once and read on every agent dial.
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased.Proof
bun test server/tests/config.test.ts: 151 pass, 0 fail.bun test server/tests/agent-endpoint.test.ts: 48 pass, 0 fail.tsc --noEmitclean on server. New tests cover: the managed agent's host:port joining the set, the picked harness URL joining, and the #888 repro end to end (checkAgentEndpointonhttp://127.0.0.1:41706/ag-uirefuses without the implicit trust and allows with the config's set).Fixes #888