ShellAgent: Ensure that the HTTP port is set before reading it