It seems like the assumption that a lot of people in this thread are making is that security arrangements were FUBAR'd in the planning stage and this is where things went wrong. However, isn't it possible that the planning had indeed taken place and agreements had already been made about these things, with this incident happening anyway? I don't think that the president pulling the SS agent inside with him really proves the point that the Chilean security simply did not know that the SS agents were "with" the president. The only thing this proves is that Chilean security didn't want to get into the same kind of shoving match with the US president that they got into with the US president's security force.
The way I see it, there are a few possibilities of how this happened. First, it could've been a communication breakdown between the US and Chilean authorities. Second, it could be a lack of communication in US security. Third, it could've been a breakdown of communication in Chilean authorities. Or, the fourth, there was perfect communication and the incident still took place.
Perhaps it is paranoid of me to entertain these thoughts, but I think it is absolutely possible that the Chilean security was aware of the plan, and simply trying to flex their muscle. Judging from the mockery of the US Secret Service agents, it seems fairly plain to see that there was already a negative attitude towards these guys. I suppose a good way to get a clue on this would be to find out if other world leaders were also denied their security teams.