Conversation
…ck as a typed endpoint A coworker created as Built in on a deployment with a managed Bot is stored pointing at that Bot's address, and the profile publishes it with `builtIn` beside it. The Connection section reads the flag and does not show an address nobody typed. The General section did not. Every in-place edit (name, title, role, visibility) sent the whole profile back, endpoint included, and `parseAgentInput` checks an endpoint it is sent exactly as it checks a person's. `scripts/start.sh` sets `MANAGED_AGENT_AG_UI_URL` to `http://localhost:4201/ag-ui`, and with private hosts closed that check refuses it, so every edit of a built-in coworker failed with "That address is inside this deployment's own network, so an agent may not live there." The General section now sends an empty endpoint for a built-in coworker. The update route already reads empty as "leave the stored one", so the managed address stays where it is and the `bot.updated` row no longer names it as though it had been repointed. A coworker somebody hosts still sends its own endpoint, so an edit never reverts it to the built-in one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kevin9327
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
September 16, 2026 10:48
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
On a deployment with a managed Bot, a coworker created as Built in is stored as
remote_ag_uipointing at that Bot's address (profile-store.tscreate). The profile publishes the address, and sincebuiltInwas added it also publishes the flag, so a screen can tell the address was never typed by anyone. The Connection section already uses it: "an internal address they never typed".The General section does not use it. Each in-place edit (Name, Title, Role, Visibility) calls
save, which rebuilds the whole input withendpoint: profile.endpoint ?? "". So for a built-in coworker,PATCH /api/agents/:idreceives the managed Bot's address, andparseAgentInputruns it throughcheckAgentEndpointexactly as if a person had typed it.The README's quick start is
bash scripts/start.sh, which setsMANAGED_AGENT_AG_UI_URL=http://localhost:4201/ag-ui. Private hosts are closed unlessAGENT_COMPUTER_ALLOW_PRIVATE_HOSTS=true, so that check refuses the address. Every edit of every built-in coworker fails, and this appears under the field:The same happens on any deployment whose managed Bot is at a literal private address not named in
AGENT_ENDPOINT_ALLOWED_HOSTS. The desktop app is not affected because it opens private hosts. A cluster DNS name is not affected because it passes the static check.The fix is one line in
GeneralSection: a built-in coworker sends an empty endpoint. The route already reads empty as "leave the stored one":parseAgentInputskips"", andstore.updatespreadspreviousand overridesendpointonly when one is given. So:bot.updatedrow stops naming the managed address as anendpointon every rename. That field exists because "repointing the endpoint is the dangerous edit and is worth naming".A coworker somebody hosts still sends its own endpoint. That is what the
endpointOfcomment in the store needs, so an edit never reverts an external agent to the built-in one, and the second test pins it.The server's endpoint check is untouched, and so is the design question in #399 about how a built-in coworker is stored.
Where it runs
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased.Proof
New
app/tests/agent-dialog-built-in-edit.test.tsx. It draws the realAgentDialogand answersfetchwith the server's realcreateAgentRoutes, the wayagent-api-path.test.tsmounts them. Private hosts are closed andmanagedEndpointishttp://localhost:4201/ag-ui, asscripts/start.shsets it. A fake store records what the route asked it to update. Each test renames the coworker withuserEvent: Edit name, type, Save.On
main(only the test file added):The passing case is the pin: a coworker hosted at
https://agents.example.test/ag-uiis renamed and still sends that endpoint.With the fix:
bun test app/tests/agent-dialog-built-in-edit.test.tsx app/tests/agent-api-path.test.ts: 9 pass, 0 fail. The built-in rename reachesstore.updatewithname: "Receipts"and noendpoint, with no alert. The hosted rename still carries its endpoint.bun test app/: 852 pass, 29 fail. Onmainit is 850 pass with the same 29 failures, all from this Windows machine:serve.test.tsport and websocket cases, Windows path separators, and a relative-time assertion reading a Korean locale.bun run typecheck(app, server, worker): exit 0.bunx biome checkon the changed files: clean.The changed line runs both ways, built-in and hosted, in the two tests.
This PR adds its line at the top of
## Unreleased, the same place other open PRs add theirs, so the changelog may conflict. I'm happy to rebase.🤖 Generated with Claude Code