From an earlier quote, from a press conference:
"The on-scene commander at that time believed that it had transitioned from an active shooter to a barricaded subject," Texas Department of Public Safety Col. Steven McCraw said.
I think this fits with what I was saying earlier, about an indecisive guy in charge. Perhaps not even indecisive, just having made a particular decision, which decision seems to be a bad decision.
It sounds like the cops were totally blocking out the hallway, so the kids in classrooms other than the one in question were safe.
That, too, seems like a bad decision. With that many cops around, and a shooter whose weaponry isn't actually known, a sudden attack by the gunman could result in a hail of bullets or possibly an explosion. That tactical vest he had on could be stuffed with explosives. Keeping the kids inside the building seems like a really bad idea.
Meanwhile, kids inside the room might be bleeding to death, or, as we know now actually happened, might have escaped detection, which could end at any minute.
Eventually, someone else showed up on the scene and said, (not a direct quote) "What the hell is going on? Get in there and take him out! Oh, never mind, we'll do it!" And then, and only then, did it end.