Repository navigation
Conversation
A hook on its own port listened on 127.0.0.1 only. In a container the serving port binds 0.0.0.0, but the hook port stayed on the container's loopback, so a published port (docker -p 9000:9000, as agentcore dev does) could never reach it. Bind hook ports to the same host as the serving port again: run()'s host (0.0.0.0 in a container, 127.0.0.1 otherwise). The runtime calls hooks on 127.0.0.1, which both hosts accept.
Contributor
✅ No Breaking Changes DetectedNo public API breaking changes found in this PR. |
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
nborges-aws
approved these changes
Nov 25, 2026
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.
The build warmup hook (#754 / #332) serves its routes on a separate port when
HookConfig.portis set, but that port always bound to127.0.0.1. Inside a container,agentcore devreaches the agent through the published port on the container's external interface, so it couldn't reach the hook and the local warmup call failed.This binds hook ports to the same host as the serving port (
0.0.0.0in a container,127.0.0.1otherwise), so the hook is reachable wherever the main server is.Cherry-picked from the original warmup PR's final commit, which missed the first public merge. Author: @naviret.