Halon basically works by displacing the oxygen that is feeding the fire - and won't work when the material that is burning can provide its own oxidizer. Li-O batteries fall into that category, along with things like ammonium perchlorate (used to make solid rocket propellant), gunpowder, and oxygen generation canisters. Once ignited, they will continue to burn until the fuel is exhausted....
In the case of a small, single battery (e.g. laptop), Halon can keep the fire from spreading while the original source burns itself out.
Much was made in the ValuJet crash that the cargo hold did not have a fire suppression system - totally missing the point that it wouldn't have mattered - once the oxygen generators started burning, that airplane was doomed.