“Shades of Grey” is episode eighteen of season three of Stargate SG-1.
SG-1 are on the Tollan homeworld, trying to negotiate for some technology – in particular they want an ion cannon, an item which is pretty useful against Goa’uld ships.
The Tollan refuse, as they do not give their superior technology away after what happened the previous time (lots of destruction, on both sides). O’Neill gets irritated, as SG-1 had saved the Tollan in “Pretense”, and steals some technology which can disable weapons.
General Hammond is not terribly pleased, and nor are the Tollan, who sever diplomatic relations. O’Neill is forced into early retirement (again).
There’s something else bugging O’Neill, as the Pentagon refused the creation of an off-world SGC. Even then, he doesn’t seem to be himself.
There’s a cunning plot behind all this though. This episode seemed familiar; or, at least, it did when Maybourne turned up.